cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 15 results. Next

A244376 Numbers k such that 1 + k + k^3 + k^5 + k^7 + k^9 + k^11 is prime.

Original entry on oeis.org

1, 2, 10, 40, 47, 55, 62, 121, 137, 152, 167, 201, 233, 278, 290, 293, 313, 333, 370, 382, 430, 452, 460, 506, 546, 555, 613, 625, 642, 675, 705, 711, 752, 767, 793, 797, 831, 835, 837, 872, 878, 891, 906, 917, 923, 978, 985, 1005, 1012, 1017, 1018, 1021
Offset: 1

Views

Author

Vincenzo Librandi, Jun 27 2014

Keywords

Crossrefs

Cf. A127936.
Cf. numbers n such that 1+n+n^3 + ... + n^k, with k odd: A006093 (k=1), A049407 (k=3), A124154 (k=5), A124150 (k=7), A124163 (k=9), this sequence (k=11), A124164 (k=13), A244377 (k=15), A244378 (k=17), A124178 (k=19), A244379 (k=21), A124181 (k=23), A244380 (k=25), A124185 (k=27), A244383 (k=29), A124186 (k=31), A244384 (k=33), A124187 (k=35), A244385 (k=37), A124189 (k=39), A244386 (k=41), A124200 (k=43), A244387 (k=45), A124205 (k=47), A244388 (k=49), A124206 (k=51), A244389 (k=53), A124207 (k=55), A244390 (k=57), A124208 (k=59), A244391 (k=61), A124209 (k=63).

Programs

  • Magma
    [n: n in [0..1500] | IsPrime(s) where s is 1+&+[n^i: i in [1..11 by 2]]];
    
  • Mathematica
    Select[Range[4000], PrimeQ[Total[#^Range[1, 11, 2]] + 1] &]
  • PARI
    isok(n) = isprime(1 + n + n^3 + n^5 + n^7 + n^9 + n^11); \\ Michel Marcus, Jun 27 2014
    
  • Sage
    i,n = var('i,n')
    [n for n in (1..2000) if is_prime(1+(n^(2*i+1)).sum(i,0,5))] # Bruno Berselli, Jun 27 2014

A126908 Numbers k such that 1 + k^2 + k^4 + k^6 + k^7 is prime.

Original entry on oeis.org

1, 4, 13, 15, 24, 30, 37, 40, 55, 93, 138, 139, 148, 153, 154, 159, 160, 165, 184, 195, 204, 223, 258, 303, 355, 360, 373, 459, 472, 475, 510, 519, 534, 577, 594, 607, 615, 627, 658, 672, 688, 723, 735, 739, 795, 805, 807, 817, 819, 820, 847, 874, 879, 904
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^7], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1000],PrimeQ[1+#^2+#^4+#^6+#^7]&] (* Harvey P. Dale, Jan 15 2016 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^7) \\ Charles R Greathouse IV, Feb 17 2017

A126916 Numbers n such that 1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^12 + n^14 + n^16 + n^18 + n^20 + n^22 + n^23 is prime.

Original entry on oeis.org

1, 2, 11, 23, 47, 64, 77, 80, 103, 251, 290, 321, 331, 335, 375, 382, 387, 403, 507, 568, 590, 594, 649, 801, 805, 828, 830, 840, 847, 854, 905, 925, 926, 959, 982, 986, 1034, 1086, 1094, 1102, 1122, 1129, 1147, 1160, 1391
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^12 + n^14 + n^16 + n^18 + n^20 + n^22 + n^23], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1400],PrimeQ[Total[#^Range[2,22,2]]+1+#^23]&] (* Harvey P. Dale, Oct 04 2018 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^10+n^12+n^14+n^16+n^18+n^20+n^22+n^23) \\ Charles R Greathouse IV, Feb 17 2017

A124401 Indices where 2 occurs in A124151.

Original entry on oeis.org

3, 5, 8, 9, 11, 15, 21, 39, 50, 63, 83, 95, 99, 173, 350, 854, 1308, 1769, 2903, 5250, 5345, 5639, 6195, 7239, 21368, 41669, 47684, 58619, 63515, 69468, 70539, 133508, 134993, 187160, 493095
Offset: 1

Views

Author

Artur Jasinski, Dec 14 2006

Keywords

Comments

Does 2 occur infinitely often in A124151?
The sum in A124151 is 1+n if k=1, and 1+k*(k^(2n)-1)/(k^2-1) if k>1. The indices of A124151(n)=2 are where k=1 is avoided, but where k=2 leads to a prime, i.e., where 1+n is not prime but 1+2*(4^n-1)/3 = (2^(2n+1)+1)/3 is prime. Therefore this sequence here is constructed by taking all n=(A000978(i)-1)/2 (the members of A127936), and eliminating cases with 1+n in A000040. - R. J. Mathar, Feb 03 2010

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[ Sum[k^(2j - 1), {j, n}] + 1] && k < 3, k++ ]; k]; lst = {}; Do[ If[f@n == 2, Print[n]; AppendTo[lst, n]], {n, 9250}]; lst (* Robert G. Wilson v, Dec 17 2006 *)
  • PARI
    is(n) = !isprime(n+1) && isprime(1 + 2*(4^n-1)/3); \\ Amiram Eldar, Oct 24 2024

Formula

A127936 \ A006093. - R. J. Mathar, Feb 03 2010

Extensions

More terms from Robert G. Wilson v, Dec 17 2006
a(24)-a(35) from R. J. Mathar, Feb 03 2010

A124151 Smallest k such that 1 + Sum{j=1..n} k^(2*j-1) is prime.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 10, 2, 2, 1, 2, 1, 48, 182, 2, 1, 60, 1, 10, 42, 2, 1, 102, 12, 4, 12, 110, 1, 12, 1, 100, 5, 28, 18, 144, 1, 102, 9, 2, 1, 30, 1, 186, 110, 130, 1, 566, 23, 1234, 2, 12, 1, 336, 103, 142, 341, 1104, 1, 444, 1, 22, 119, 2, 45, 14, 1, 84, 23, 238, 1, 936, 1, 78, 12
Offset: 1

Views

Author

Artur Jasinski, Dec 13 2006, Dec 14 2006

Keywords

Comments

a(n) = 1 if and only if n is in A006093 (primes minus 1), so 1 occurs infinitely often.

Examples

			Consider n = 7. 1 + Sum{j=1...7} k^(2*j-1) evaluates to 8, 10923, 1793614, 71582789, 1271565756, 13433856703, 98907531458, 558482096649, 2573639151184, 10101010101011 for k = 1, ..., 10. Only the last of these numbers, 1+10+10^3+10^5+10^7+10^9+10^11+10^13 = 10101010101011, is prime, hence a(7) = 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ !PrimeQ[Sum[k^(2j - 1), {j, n}] + 1], k++ ]; k]; Array[f, 74] (* Robert G. Wilson v, Dec 17 2006 *)
  • PARI
    a(n)={my(k=1);while(!isprime(1+sum(j=1,n,k^(2*j-1))),k++); k} \\ Klaus Brockhaus, Dec 16 2006

Extensions

Edited and extended by Klaus Brockhaus, Dec 16 2006

A126906 Smallest k such that 1 + k^(2*n+1) + Sum_{j=1..n} k^(2*j) is prime.

Original entry on oeis.org

1, 2, 1, 2, 1, 10, 17, 2, 1, 2, 1, 94, 122, 22, 1, 80, 1, 4, 6, 2, 1, 242, 3, 6, 5, 80, 1, 12, 1, 82, 96, 2, 7, 188, 1, 136, 69, 158, 1, 2, 1, 954, 50, 118, 1, 570, 14, 90, 45, 6, 1, 228, 38, 4, 6, 22, 1, 12, 1, 580, 86, 336, 24, 768, 1, 1170, 408, 340, 1, 896
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Comments

1 is a term if and only if number of terms in polynomial is prime.

Crossrefs

Programs

  • Mathematica
    a[n_]: = Module[{k = 1}, While[!PrimeQ[1 + k^(2*n+1) + Sum[k^(2*j), {j, 1, n}]], k++]; k]; Array[a, 30] (* Amiram Eldar, Mar 13 2020 *)
  • PARI
    a(n) = my(k = 1); while(! isprime(1 + k^(2*n+1) + sum(j=1, n, k^(2*j))), k++); k; \\ Michel Marcus, Mar 13 2020

Extensions

More terms from Amiram Eldar, Mar 13 2020

A126907 Numbers n such that 1 + n^2 + n^4 + n^5 is prime.

Original entry on oeis.org

2, 4, 6, 8, 12, 18, 32, 34, 68, 70, 78, 88, 110, 114, 116, 118, 120, 122, 132, 134, 142, 150, 172, 180, 186, 190, 210, 216, 238, 246, 254, 272, 294, 322, 362, 376, 380, 386, 388, 408, 476, 500, 502, 506, 508, 520, 530, 542, 564, 584, 588, 590, 616, 620, 632
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^5], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[700],PrimeQ[1+#^2+#^4+#^5]&] (* Harvey P. Dale, Jun 24 2018 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^5) \\ Charles R Greathouse IV, Jun 13 2017

A126909 Numbers n such that 1 + n^2 + n^4 + n^6 + n^8 + n^9 is prime.

Original entry on oeis.org

2, 18, 48, 56, 116, 120, 128, 146, 194, 198, 200, 230, 266, 278, 282, 288, 324, 362, 372, 390, 396, 420, 434, 458, 488, 576, 594, 708, 714, 728, 740, 774, 818, 830, 860, 888, 896, 912, 914, 990, 996, 1002, 1008, 1010, 1016, 1044, 1124, 1128, 1140, 1146, 1260
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^9], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1300],PrimeQ[1+#^2+#^4+#^6+#^8+#^9]&] (* Harvey P. Dale, Apr 25 2020 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^9) \\ Charles R Greathouse IV, Jun 13 2017

A126910 Numbers k such that 1 + k^2 + k^4 + k^6 + k^8 + k^10 + k^11 is prime.

Original entry on oeis.org

1, 2, 3, 35, 48, 77, 97, 105, 111, 112, 122, 128, 161, 168, 175, 216, 231, 255, 271, 276, 297, 338, 361, 370, 378, 422, 485, 513, 525, 558, 622, 658, 661, 662, 667, 675, 700, 718, 725, 742, 753, 766, 770, 795, 796, 833, 875, 886, 921, 993, 1027, 1066, 1078
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^11], AppendTo[a, n]], {n, 1, 1400}]; a
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^10+n^11) \\ Charles R Greathouse IV, Jun 13 2017

A126911 Numbers k such that 1 + k^2 + k^4 + k^6 + k^8 + k^10 + k^12 + k^13 is prime.

Original entry on oeis.org

10, 24, 60, 148, 174, 180, 268, 274, 280, 294, 346, 472, 484, 516, 522, 598, 654, 804, 834, 856, 858, 898, 994, 1012, 1036, 1054, 1066, 1102, 1168, 1272, 1294, 1338, 1342, 1368, 1420, 1462, 1500, 1536, 1564, 1588, 1608, 1624, 1710, 1746, 1786, 1792, 1822, 1992
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^12 + n^13], AppendTo[a, n]], {n, 1, 1400}]; a
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^10+n^12+n^13) \\ Charles R Greathouse IV, Jun 13 2017
    
  • Python
    from sympy import isprime
    def ok(k): return isprime(1+sum(k**i for i in [2, 4, 6, 8, 10, 12, 13]))
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Oct 24 2021
Showing 1-10 of 15 results. Next