[go: up one dir, main page]

login
Search: a006314 -id:a006314
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = 4*a(n-1) + n with n > 1, a(1)=1.
+0
21
1, 6, 27, 112, 453, 1818, 7279, 29124, 116505, 466030, 1864131, 7456536, 29826157, 119304642, 477218583, 1908874348, 7635497409, 30541989654, 122167958635, 488671834560, 1954687338261, 7818749353066
OFFSET
1,2
LINKS
Hacène Belbachir and El-Mehdi Mehiri, Enumerating moves in the optimal solution of the Tower of Hanoi, arXiv:2210.08657 [math.CO], 2022.
László Tóth, On Schizophrenic Patterns in b-ary Expansions of Some Irrational Numbers, arXiv:2002.06584 [math.NT], 2020. See also Proc. Amer. Math. Soc. 148 (2020), 461-469.
FORMULA
a(n) = (4^(n+1) - 3*n - 4)/9.
G.f.: x/((1-4*x)*(1-x)^2).
a(n) = Sum_{k=0..n} (n-k)*4^k = Sum_{k=0..n} k*4^(n-k). - Paul Barry, Jul 30 2004
a(n) = Sum_{k=0..n} binomial(n+2, k+2)*3^k [Offset 0]. - Paul Barry, Jul 30 2004
a(n) = Sum_{k=0..n} Sum_{j=0..2k} (-1)^(j+1)*J(j)*J(2k-j), J(n) = A001045(n). - Paul Barry, Oct 23 2009
Convolution square of A006314. - Michael Somos, Jun 20 2012
E.g.f.: (4*exp(4*x) - (4+3*x)*exp(x))/9. - G. C. Greubel, Feb 18 2020
a(n) = A014916(-n-1)*4^(n+1) = A091919(2*n-2) for all n in Z. - Michael Somos, Oct 02 2020
a(n) = Sum_{k=0..n} A002450(k). - Joseph Brown, May 11 2021
Last digits give A171654. - Paul Curtz, Oct 10 2021
EXAMPLE
G.f. = x + 6*x^2 + 27*x^3 + 112*x^4 + 453*x^5 + 1818*x^6 + 7279*x^7 + ...
MATHEMATICA
RecurrenceTable[{a[1]==1, a[n]==4a[n-1]+n}, a[n], {n, 30}] (* Harvey P. Dale, Oct 12 2011 *)
a[ n_]:= SeriesCoefficient[x/((1-4x)(1-x)^2), {x, 0, n}] (* Michael Somos, Jun 20 2012 *)
PROG
(Magma) [(4^(n+1)-3*n-4)/9: n in [1..30]]; // Vincenzo Librandi, Aug 23 2011
(PARI) {a(n) = polcoeff( x / ((1 - x)^2 * (1 - 4*x)) + x * O(x^n), n)} /* Michael Somos, Jun 20 2012 */
(Sage) [(4^(n+1) -3*n -4)/9 for n in (1..30)] # G. C. Greubel, Feb 18 2020
(Python)
def A014825(n): return (((1<<(n+1<<1))-4)//3-n)//3 # Chai Wah Wu, Nov 12 2024
CROSSREFS
Cf. A002450 (first differences), A052161 (partial sums).
Cf. A171654 (mod 10).
KEYWORD
nonn,easy
STATUS
approved
At these values of k the 1st, 2nd, 3rd, 4th and 5th cyclotomic polynomials all give prime numbers.
+0
3
1068630, 1441590, 1867950, 3429300, 4084230, 5651730, 6322890, 6770610, 7158630, 7804830, 9437760, 9624270, 13625850, 23194860, 25848840, 26588520, 28714950, 29451840, 32984430, 33650580, 36500910, 38177130, 42856590, 49531020, 50016540, 50222070, 52083330, 54637590
OFFSET
1,1
COMMENTS
Numbers k such that C1(k) = k-1, C2(k) = k+1, C3(k) = k^2+k+1, C4(k) = k^2+1 and C5(k) = k^4+k^3+k^2+k+1 are all primes.
LINKS
EXAMPLE
For k = 1068630: the 1st, 2nd, 3rd, 4th and 5th cyclotomic polynomials give a quintet of primes: {1068629, 1068631, 1141971145531, 1141970076901, 1304096876879617162402531}.
PROG
(PARI) is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1) && isprime(k^2+k+1) && isprime(k^4+k^3+k^2+k+1) ; \\ Amiram Eldar, Sep 24 2024
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, May 07 2002
EXTENSIONS
More terms from Don Reble, May 11 2002
a(24)-a(28) from Amiram Eldar, Sep 24 2024
STATUS
approved
At these values of k, the 1st, 2nd, 3rd and 4th cyclotomic polynomials all give prime numbers.
+0
5
6, 150, 2730, 9000, 9240, 35280, 41760, 43050, 53280, 65520, 76650, 96180, 111030, 148200, 197370, 207480, 213360, 226380, 254280, 264600, 309480, 332160, 342450, 352740, 375450, 381990, 440550, 458790, 501030, 527070, 552030, 642360, 660810
OFFSET
1,1
COMMENTS
Numbers k such that k-1, k+1, k^2+k+1 and k^2+1 are all primes.
LINKS
EXAMPLE
For k = 6: 5, 7, 43 and 37 are prime values of the first 4 cyclotomic polynomials.
MATHEMATICA
lst={}; Do[If[PrimeQ[n-1]&&PrimeQ[n+1]&&PrimeQ[1+n+n^2]&&PrimeQ[1+n^2], AppendTo[lst, n]], {n, 10^6}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 19 2008 *)
Select[Range[10^6], Function[k, AllTrue[Cyclotomic[#, k] & /@ Range@ 4, PrimeQ]]] (* Michael De Vlieger, Jul 18 2017 *)
PROG
(PARI) is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+1) && isprime(k^2+k+1); \\ Amiram Eldar, Sep 24 2024
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, May 07 2002
STATUS
approved
At these values of k the first, 2nd and 3rd cyclotomic polynomials all give prime numbers.
+0
4
6, 12, 138, 150, 192, 348, 642, 1020, 1092, 1230, 1620, 1788, 1932, 2112, 2142, 2238, 2658, 2688, 2730, 3330, 3540, 3918, 4002, 4158, 5010, 5640, 6090, 6450, 6552, 6702, 7950, 8088, 9000, 9042, 9240, 9462, 9768, 10008, 10092, 10272, 10302, 10332
OFFSET
1,1
COMMENTS
Numbers k such that k-1, k+1 and k^2+k+1 are all primes.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..5000 from Michael De Vlieger)
EXAMPLE
For k = 6: 5, 7 and 43 are prime values of the first 3 cyclotomic polynomials.
MATHEMATICA
psQ[n_]:=And@@PrimeQ[{n-1, n+1, n^2+n+1}]; Select[Range[11000], psQ] (* Harvey P. Dale, Nov 05 2011 *)
Select[Range[10500], AllTrue[Cyclotomic[Range@ 3, #], PrimeQ] &] (* Michael De Vlieger, Dec 08 2018 *)
PROG
(PARI) is(k) = isprime(k-1) && isprime(k+1) && isprime(k^2+k+1); \\ Amiram Eldar, Sep 24 2024
KEYWORD
easy,nonn
AUTHOR
Labos Elemer, May 07 2002
STATUS
approved
Numbers k such that k^524288 + 1 is prime.
+0
22
1, 75898, 341112, 356926, 475856, 1880370, 2061748, 2312092, 2733014, 2788032, 2877652, 2985036, 3214654, 3638450, 4896418, 5897794, 6339004
OFFSET
1,2
COMMENTS
Numbers k such that k^(2^j) + 1 is a generalized Fermat prime for j=19.
1880370 is a member, but its position is not yet known. - Jeppe Stig Nielsen, Jan 24 2018
PrimeGrid has now tested and double checked the necessary candidates to prove that 1880370 is a(6). - Jeppe Stig Nielsen, Feb 20 2018
PROG
(PARI) is(n)=isprime(n^524288+1) \\ Charles R Greathouse IV, Feb 20 2017
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Jun 16 2014
EXTENSIONS
a(6) from Jeppe Stig Nielsen, Feb 20 2018
a(7) from Jeppe Stig Nielsen, Apr 27 2018
a(1) = 1 inserted and a(8) added by Jeppe Stig Nielsen, Sep 10 2018
a(9)-a(12) from Jeppe Stig Nielsen, Sep 21 2019
a(13) from Jeppe Stig Nielsen, Dec 27 2019
a(14) from Ray Chandler, Mar 28 2022
a(15)-a(17) communicated by Jeppe Stig Nielsen, Apr 01 2024
STATUS
approved
Numbers k such that k^(2^13) + 1 is prime (a generalized Fermat prime).
+0
28
1, 30406, 71852, 85654, 111850, 126308, 134492, 144642, 147942, 150152, 165894, 176206, 180924, 201170, 212724, 222764, 225174, 241600, 241860, 248744, 268032, 270674, 302368, 316970, 326260, 347962, 350830, 397468, 410938, 416010, 424584, 425848, 426338
OFFSET
1,2
PROG
(PARI) is(n)=isprime(n^2^13+1) \\ Charles R Greathouse IV, Feb 17 2017
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jun 09 2013
EXTENSIONS
Missing terms inserted (from link) by Jeppe Stig Nielsen, Apr 14 2017
STATUS
approved
Numbers k such that k^2 + 1 is prime.
(Formerly M1010)
+0
175
1, 2, 4, 6, 10, 14, 16, 20, 24, 26, 36, 40, 54, 56, 66, 74, 84, 90, 94, 110, 116, 120, 124, 126, 130, 134, 146, 150, 156, 160, 170, 176, 180, 184, 204, 206, 210, 224, 230, 236, 240, 250, 256, 260, 264, 270, 280, 284, 300, 306, 314, 326, 340, 350, 384, 386, 396
OFFSET
1,2
COMMENTS
Hardy and Littlewood conjectured that the asymptotic number of elements in this sequence not exceeding n is approximately c*sqrt(n)/log(n) for some constant c. - Stefan Steinerberger, Apr 06 2006
Also, nonnegative integers such that a(n)+i is a Gaussian prime. - Maciej Ireneusz Wilczynski, May 30 2011
Apparently Goldbach conjectured that any a > 1 from this sequence can be written as a=b+c where b and c are in this sequence (Lemmermeyer link below). - Jeppe Stig Nielsen, Oct 14 2015
No term > 2 can be both in this sequence and in A001105 because of the Aurifeuillean factorization (2*k^2)^2 + 1 = (2*k^2 - 2*k + 1) * (2*k^2 + 2*k + 1). - Jeppe Stig Nielsen, Aug 04 2019
REFERENCES
Harvey Dubner, "Generalized Fermat primes", J. Recreational Math., 18 (1985): 279-280.
R. K. Guy, "Unsolved Problems in Number Theory", 3rd edition, A2.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, p. 15, Thm. 17.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
H. Dubner, Generalized Fermat primes, J. Recreational Math. 18.4 (1985-1986), 279. (Annotated scanned copy)
L. Euler, Lettre CXLIX (to Goldbach), 1752.
L. Euler, De numeris primis valde magnis, Novi Commentarii academiae scientiarum Petropolitanae 9 (1764), pp. 99-153. See pp. 123-125.
R. K. Guy, Letter to N. J. A. Sloane, 1988-04-12 (annotated scanned copy).
F. Lemmermeyer, Primes of the form a^2+1, Math Overflow question (2010).
Eric Weisstein's World of Mathematics, Landau's Problems.
Eric Weisstein's World of Mathematics, Power.
Eric Weisstein's World of Mathematics, Near-Square Prime.
Marek Wolf, Search for primes of the form m^2+1, arXiv:0803.1456 [math.NT], 2008-2010.
FORMULA
a(n) = A090693(n) - 1.
a(n) = 2*A001912(n-1) for n > 1. - Jeppe Stig Nielsen, Aug 04 2019
MATHEMATICA
Select[Range[350], PrimeQ[ #^2 + 1] &] (* Stefan Steinerberger, Apr 06 2006 *)
Join[{1}, 2Flatten[Position[PrimeQ[Table[x^2+1, {x, 2, 1000, 2}]], True]]] (* Fred Patrick Doty, Aug 18 2017 *)
PROG
(PARI) isA005574(n) = isprime(n^2+1) \\ Michael B. Porter, Mar 20 2010
(PARI) for(n=1, 1e3, if(isprime(n^2 + 1), print1(n, ", "))) \\ Altug Alkan, Oct 14 2015
(Magma) [n: n in [0..400] | IsPrime(n^2+1)]; // Vincenzo Librandi, Nov 18 2010
(Haskell)
a005574 n = a005574_list !! (n-1)
a005574_list = filter ((== 1) . a010051' . (+ 1) . (^ 2)) [0..]
-- Reinhard Zumkeller, Jul 03 2015
CROSSREFS
Other sequences of the type "Numbers k such that k^2 + i is prime": this sequence (i=1), A067201 (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).
Cf. A010051, A259645, A295405 (characteristic function).
KEYWORD
nonn,easy,nice
STATUS
approved
a(n) is the smallest k >= 2 such that k^(2^n)+1 is prime, or -1 if no such k exists.
+0
36
2, 2, 2, 2, 2, 30, 102, 120, 278, 46, 824, 150, 1534, 30406, 67234, 70906, 48594, 62722, 24518, 75898, 919444
OFFSET
0,1
COMMENTS
Smallest base value yielding generalized Fermat primes. - Hugo Pfoertner, Jul 01 2003
The first 5 terms correspond with the known (ordinary) Fermat primes. A probable candidate for the next entry is 62722^131072+1, discovered by Michael Angel in 2003. It has 628808 decimal digits. - Hugo Pfoertner, Jul 01 2003
For any n, a(n+1) >= sqrt(a(n)), because k^(2^(n+1))+1 = (k^2)^(2^n)+1. - Jeppe Stig Nielsen, Sep 16 2015
Does the sequence contain any perfect squares? If a(n) is a perfect square, then a(n+1) = sqrt(a(n)). - Jeppe Stig Nielsen, Sep 16 2015
If for a particular n, a(n) exists, then a(i) exist for all i=0,1,2,...,n. No proof is known that this sequence is infinite. Such a result would clearly imply the infinitude of A002496. - Jeppe Stig Nielsen, Sep 18 2015
919444 is a candidate for a(20). See Zimmermann link. - Serge Batalov, Sep 02 2017
Now PrimeGrid has tested and double checked all b^(2^20) + 1 with b < 919444, so we have proof that a(20) = 919444. - Jeppe Stig Nielsen, Dec 30 2017
LINKS
Lucile and Yves Gallot, Generalized Fermat Prime Search
Luke Harmon, Gaetan Delavignette, Arnab Roy, and David Silva, PIE: p-adic Encoding for High-Precision Arithmetic in Homomorphic Encryption, Cryptology ePrint Archive 2023/700.
FORMULA
a(n) = A085398(2^(n+1)). - Jianing Song, Jun 13 2022
EXAMPLE
The primes are 2^(2^0) + 1 = 3, 2^(2^1) + 1 = 5, 2^(2^2) + 1 = 17, 2^(2^3) + 1 = 257, 2^(2^4) + 1 = 65537, 30^(2^5) + 1, 102^(2^6) + 1, ....
MATHEMATICA
f[n_] := (p = 2^n; k = 2; While[cp = k^p + 1; !PrimeQ@cp, k++ ]; k); Do[ Print[{n, f@n}], {n, 0, 17}] (* Lei Zhou, Feb 21 2005 *)
PROG
(PARI) a(n)=my(k=2); while(!isprime(k^(2^n)+1), k++); k \\ Anders Hellström, Sep 16 2015
KEYWORD
hard,more,nonn
AUTHOR
Robert G. Wilson v, Sep 06 2000
EXTENSIONS
1534 from Robert G. Wilson v, Oct 30 2000
62722 from Jeppe Stig Nielsen, Aug 07 2005
24518 and 75898 from Lei Zhou, Feb 01 2012
919444 from Jeppe Stig Nielsen, Dec 30 2017
STATUS
approved
Numbers b such that b^262144+1 is prime.
+0
23
1, 24518, 40734, 145310, 361658, 525094, 676754, 773620, 1415198, 1488256, 1615588, 1828858, 2042774, 2514168, 2611294, 2676404, 3060772, 3547726, 3596074, 3673932, 3853792, 3933508, 4246258, 4489246, 5152128, 5205422, 5828034, 6287774, 6291332, 8521794
OFFSET
1,2
COMMENTS
Base values b yielding a generalized Fermat prime b^(2^k)+1 for k=18.
KEYWORD
nonn,hard
AUTHOR
Felix Fröhlich, Jun 21 2014
EXTENSIONS
a(9), announced in message 92163 in PrimeGrid forum, added by Felix Fröhlich, Feb 17 2016
a(10), a(11) sent by Maximilian Pacher, Jun 27 2016, and a(12) on Aug 24 2016. - N. J. A. Sloane
a(13) from Felix Fröhlich, Nov 27 2016
a(14)-a(17) from Jeppe Stig Nielsen, Sep 06 2017
a(1) = 1 inserted by and more terms from Jeppe Stig Nielsen, Sep 10 2018
a(27)-a(30) from Jeppe Stig Nielsen, Sep 21 2019
STATUS
approved
Numbers b such that b^65536 + 1 is prime.
+0
23
1, 48594, 108368, 141146, 189590, 255694, 291726, 292550, 357868, 440846, 544118, 549868, 671600, 843832, 857678, 1024390, 1057476, 1087540, 1266062, 1361846, 1374038, 1478036, 1483076, 1540550, 1828502, 1874512, 1927034, 1966374, 2019300, 2041898, 2056292
OFFSET
1,2
COMMENTS
Base values b yielding a generalized Fermat prime b^(2^k) + 1 for k=16.
First square member of sequence is 3934049284 = (A253854(1))^2. - Jeppe Stig Nielsen, Jun 29 2015
LINKS
Ray Chandler, Table of n, a(n) for n = 1..1604 (2..70 from Felix Fröhlich, 71..425 from Jeppe Stig Nielsen)
J. S. S. Nielsen, Generalized Fermat Primes sorted by base (see table at the bottom of the page)
PrimeGrid, GFN Status by n-Range, Message 89145
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Dec 05 2014
EXTENSIONS
Corrected last term, and extended, by Jeppe Stig Nielsen, Jun 29 2015
New b-file, updated with data from Message 89145 at PrimeGrid forum uploaded and sequence data corrected, by Felix Fröhlich, Jan 03 2016
a(1) = 1 inserted and new b-file by Jeppe Stig Nielsen, Sep 10 2018
STATUS
approved

Search completed in 0.022 seconds