OFFSET
1,1
COMMENTS
This sequence has the property that if a(n) appears first in the table as a prime factor of 2^m+1 for some m then a(n)=2*k*m+1 for some k.
When, for some m, 2^m+1 has more than one prime factor appearing in the table for the first time, we adopt the convention of entering them in ascending order. For example, the entries ..., 29, 113, ... both arise from 2^14+1.
LINKS
Harvey P. Dale and Charles R Greathouse IV, Table of n, a(n) for n = 1..4017 (first 650 terms from Dale)
EXAMPLE
2^1+1=3, 2^2+1=5, 2^3+1=3^2 and 2^4+1=17. Thus a(1)=3, a(2)=5 and a(3)=17, on noting that 2^3+1 contributes no new prime factors.
MATHEMATICA
DeleteDuplicates[Flatten[Table[Transpose[FactorInteger[2^k+1]][[1]], {k, 50}]]] (* Harvey P. Dale, Mar 30 2014 *)
PROG
(PARI) lista(n)=prs = Set(); for (k=1, n, f = factor(2^k+1); for (i=1, length(f~), onef = f[i, 1]; if (! setsearch(prs, onef), print1(onef, ", "); prs = setunion(prs, Set(onef)); ); ); ); \\ Michel Marcus, Apr 18 2013
(PARI) G=1; for(n=1, 500, g=gcd(f=2^n+1, G); while(g>1, g=gcd(g, f/=g)); f=factor(f)[, 1]; if(#f, for(i=1, #f, print1(f[i]", ")); G*=factorback(f))) \\ Charles R Greathouse IV, Jan 03 2018
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Martin Griffiths, Mar 29 2009
STATUS
approved