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.

Previous Showing 21-30 of 38 results. Next

A121248 Numbers k such that the sum of the first 2^k primes is a prime.

Original entry on oeis.org

0, 1, 2, 6, 9, 10, 32, 36, 55
Offset: 1

Views

Author

Alexander Adamchuk, Aug 22 2006

Keywords

Comments

Corresponding primes in the sums of the first 2^n primes or primes in A099825[n] are given in A113617[n] = {2,5,17,8893,868151,3875933,219554912086470964379,...}.

Crossrefs

Programs

  • Mathematica
    Do[f=Sum[Prime[k],{k,1,2^n}]; If[PrimeQ[f],Print[{n,f}]],{n,0,32}]

Formula

A099825(a(n)) = A113617(n). - Amiram Eldar, Jul 01 2024

Extensions

Edited by Robert G. Wilson v, Aug 26 2006
a(7)-a(9) from Amiram Eldar, Jul 01 2024

A321439 Numbers k such that if j is the sum of the first prime(k) primes then the sum of the first j primes is prime.

Original entry on oeis.org

8, 21, 27, 37, 59, 65, 66, 82, 86, 99, 105, 111, 126, 143, 147, 155, 156, 165, 177, 181, 187, 194, 195, 200, 230, 231, 242, 262, 284, 374, 430, 449, 460, 477, 502, 512, 539, 540, 541, 622, 634, 657, 707, 731, 735, 739, 745, 766, 767, 781, 784, 785, 791, 801
Offset: 1

Views

Author

David James Sycamore, Nov 09 2018

Keywords

Comments

Numbers k such that A007504(A007504(prime(k))) is prime. Terms can be even or odd since A007504(A007504(prime(k))) is odd for any k.

Examples

			8 is a term because prime(8) = 19, A007504(19) = 568, and A007504(568) = 1086557, which is prime.
2 is not a term since prime(2) = 3, A007504(3) = 10 and A007504(10) = 129, which is not prime.
		

Crossrefs

Programs

  • Maple
    N:=100:
    for n from 1 to N do
    X:=add(ithprime(k),k=1..ithprime(n));
    Y:=add(ithprime(r),r=1..X);
    if isprime(Y)then print(n);
    end if:
    end do:
  • Mathematica
    primeSum[n_] := Sum[Prime[i], {i, n}]; Select[Range[200], PrimeQ[ primeSum[primeSum[Prime[#]]]] &] (* Amiram Eldar, Nov 09 2018 *)
  • PARI
    sumprimes(n)={my(p=0, s=0); for(i=1, n, p=nextprime(1+p); s+=p); s}
    ok(k)={isprime(sumprimes(sumprimes(prime(k))))}
    for(n=1, 100, if(ok(n),print1(n, ", "))) \\ Andrew Howroyd, Nov 11 2018
  • Perl
    use ntheory qw(:all);
    for (my ($i, $k) = (1, 1); ; ++$k) {
        if (is_prime sum_primes nth_prime sum_primes nth_prime nth_prime $k) {
            print "a($i) = $k\n"; ++$i;
        }
    } # Daniel Suteu, Nov 11 2018
    

Extensions

a(30)-a(54) from Daniel Suteu, Nov 11 2018

A321578 a(n) is the maximum value of k such that A007504(k) <= prime(n).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15
Offset: 1

Views

Author

David James Sycamore, Nov 12 2018

Keywords

Comments

Let A be A007504. The number of distinct values of k such that a(k)=r is the number of primes p in the interval A(r) <= p < A(r+1); namely: 2,2,2,3,3,4,5,4,6,6,... (see A323701). Let b(n) be the smallest r such that a(r)=n, namely: 1,3,5,7,10,13,17,22,26,... For given n, if k is the index of the smallest prime >= A(n), then b(n)=k. (The equality applies when n is a term of A013916.)

Examples

			a(1)=1 since prime(1)=2 and 1 is max k such that A007504(k) <= 2.
a(5)=3 since prime(5)=11 and 3 is max k such that A007504(k) <= 11.
n=4 (in A013916). A(4)=17=prime(7), so b(4)=7.
n=7 (not in A013916). A(7)=58 < 59=prime(17), so b(7)=17.
		

Crossrefs

Programs

A364796 Numbers k such that the sum of the first k prime powers (not including 1) is a prime power.

Original entry on oeis.org

1, 2, 3, 6, 8, 13, 18, 20, 22, 37, 41, 43, 46, 62, 87, 89, 95, 99, 111, 115, 118, 124, 130, 146, 150, 160, 164, 168, 180, 192, 201, 205, 211, 221, 263, 283, 287, 315, 339, 352, 356, 364, 396, 398, 408, 418, 434, 442, 450, 476, 508, 512, 526, 534, 536, 548, 556, 582
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 08 2023

Keywords

Examples

			8 is a term because the sum of the first 8 prime powers 2 + 3 + 4 + 5 + 7 + 8 + 9 + 11 = 49 is a prime power.
		

Crossrefs

Programs

  • Mathematica
    Position[Accumulate[Select[Range[4000], PrimePowerQ]], _?PrimePowerQ, Heads -> False] // Flatten
  • PARI
    list(lim) = {my(k = 0, s = 0); for(p = 1, lim, if(isprimepower(p), k++; s += p; if(isprimepower(s), print1(k, ", "))));} \\ Amiram Eldar, Jun 20 2025

A376891 Numbers k such that the sum of the first k lesser of twin primes is a lesser of twin prime.

Original entry on oeis.org

1, 23, 143, 251, 281, 305, 341, 455, 605, 761, 1349, 1613, 2765, 2903, 2981, 3623, 3725, 3923, 4049, 4133, 4745, 5207, 5303, 5489, 5765, 6515, 6611, 7793, 7835, 8153, 8237, 10427, 10697, 11261, 11447, 11627, 11729, 12401, 12701, 13871, 14327, 15359, 15683
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 08 2024

Keywords

Crossrefs

Programs

  • Maple
    K:= 1: count:= 1: s:= 3: k:= 1:
    for p from 5 by 6 do
      if isprime(p) and isprime(p+2) then
        k:= k+1;
        s:= s+p;
        if s mod 6 = 5 and isprime(s) and isprime(s+2) then
          count:= count+1; K:= K,k;
          if count = 100 then break fi;
    fi fi od:
    K; # Robert Israel, Oct 08 2024
  • Mathematica
    Position[Accumulate[Select[Partition[Prime[Range[200000]],2,1],#[[2]]-#[[1]]==2&][[;;,1]]],?(AllTrue[#+{0,2},PrimeQ]&)]//Quiet//Flatten (* _Harvey P. Dale, Jun 24 2025 *)
  • PARI
    lista(nn) = my(v=select(p->isprime(p+2), primes(nn)), s = vector(#v)); s[1] = v[1]; for (i=2, #v, s[i] = s[i-1]+v[i]); Vec(select(x->(isprime(x) && isprime(x+2)), s, 1)); \\ Michel Marcus, Oct 10 2024

A376892 Numbers k such that the sum of the first k greater of twin primes is a greater of twin prime.

Original entry on oeis.org

1, 45, 105, 675, 987, 1431, 1593, 1677, 1785, 1875, 2037, 2541, 3039, 3045, 3051, 3183, 3267, 3531, 3699, 4113, 4239, 4377, 4443, 5643, 5673, 5709, 6027, 6543, 6615, 6771, 6891, 6915, 6999, 8043, 8109, 8313, 8607, 8739, 10197, 10569, 11103, 11139, 11361, 11787, 12045
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 08 2024

Keywords

Crossrefs

Programs

  • Maple
    K:= 1: count:= 1: s:= 5: k:= 1:
    for p from 7 by 6 do
      if isprime(p) and isprime(p-2) then
        k:= k+1;
        s:= s+p;
        if s mod 6 = 1 and isprime(s) and isprime(s-2) then
          count:= count+1; K:= K, k;
          if count = 100 then break fi;
    fi fi od:
    K; # Robert Israel, Nov 08 2024
  • PARI
    lista(nn) = my(v=select(p->isprime(p-2), primes(nn)), s = vector(#v)); s[1] = v[1]; for (i=2, #v, s[i] = s[i-1]+v[i]); Vec(select(x->(isprime(x) && isprime(x-2)), s, 1)); \\ Michel Marcus, Oct 10 2024

A136443 Numbers m such that A102863(m) = 1.

Original entry on oeis.org

1, 3, 5, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 03 2008

Keywords

Comments

Except first term, numbers n such that the sum of the first n primes is composite: Essentially the complement of A013916.

Crossrefs

Programs

A155973 Smallest x such that prime(2n)x^(2n-1) + prime(2n-1)x^(2n-2) + prime(2n-2)x^(2n-3) +...+ prime(2)x^1 + 2x^0 evaluates to an odd prime.

Original entry on oeis.org

1, 1, 1, 11, 23, 1, 1, 75, 29, 27, 159, 27, 107, 179, 63, 93, 675, 593, 11, 1299, 153, 153, 197, 35, 31, 227, 297, 439, 33, 1, 133, 1, 3, 1071, 173, 153, 299, 5, 1443, 1275, 611, 1809, 941, 669, 537, 51, 151, 1, 131, 1, 1, 343, 199, 1, 279, 3, 1, 439, 597, 453, 1, 1, 1187, 391
Offset: 1

Views

Author

Cino Hilliard, Jan 31 2009

Keywords

Comments

Conjecture: The number of 1's in this sequence is infinite.
a(n) = 1 if and only if 2n is in A013916.

Examples

			n=1: 3x + 2, prime for x = 1, so a(1) = 1.
n=2: 7x^3 + 5x^2 + 3x + 2, prime for x = 1, so a(2) = 1.
n=3: 13x^5 + 11x^4 + 7x^3 + 5x^2 + 3x + 2, prime for x = 1, so a(3) = 1.
n=4: 19x^7 + 17x^6 + 13x^5 + 11x^4 + 7x^3 + 5x^2 + 3x + 2, prime for x = 11, so a(4) = 11.
		

Programs

  • PARI
    primenomial(n) = { ct=0; sr=0; p=0; d=0; d1=0; forstep(m=1,n,2, for(x=0,n,y=2; for(j=2,m+1, p = prime(j); y+=x^(j-1)*p; );
    if(y>2&&ispseudoprime(y),ct+=1; print1(x",");break ); )) }
    
  • PARI
    a(n)=my(P=Polrev(primes(2*n)),k=1);while(!ispseudoprime(subst(P, 'x, k)), k+=2); k \\ Charles R Greathouse IV, Jan 15 2013

Extensions

a(39)-a(64) from Charles R Greathouse IV, Jan 17 2013

A228490 Numbers k for which prime(1) + ... + prime(k) = 2*prime(m) for some m.

Original entry on oeis.org

3, 7, 55, 59, 65, 75, 93, 133, 137, 141, 249, 277, 313, 365, 375, 387, 391, 435, 471, 499, 563, 573, 597, 605, 619, 645, 675, 719, 787, 797, 799, 815, 825, 845, 867, 879, 919, 937, 957, 971, 1011, 1013, 1145, 1217, 1225, 1243, 1251, 1271, 1283, 1311, 1373
Offset: 1

Views

Author

Clark Kimberling, Oct 01 2013

Keywords

Examples

			a(1) = 3 because 2 + 3 + 5 = 2*prime(3) and p(3) = 5 is the least such prime summand.
		

Crossrefs

Programs

  • Mathematica
    z = 2800; f[n_] := Sum[Prime[k], {k, 1, n}]; p[n_] := If[PrimeQ[f[n]/2], 1, 0]; t = Table[p[n], {n, 1, z}]; Flatten[Position[t, 1]]

A228491 Numbers k for which sum(first k primes) = 3*prime(m) for some m.

Original entry on oeis.org

10, 16, 18, 28, 32, 34, 36, 44, 46, 54, 82, 136, 138, 246, 250, 276, 286, 362, 370, 378, 390, 554, 570, 586, 588, 668, 678, 684, 688, 690, 726, 766, 770, 826, 856, 860, 878, 880, 888, 924, 928, 932, 956, 962, 1048, 1160, 1174, 1210, 1264, 1286, 1292, 1506
Offset: 1

Views

Author

Clark Kimberling, Oct 01 2013

Keywords

Examples

			a(1) = 10 because 2 + 3 + 5 + ... + 29 = 3*prime(14) and p(10) = 29 is the least such prime summand.
		

Crossrefs

Programs

  • Mathematica
    z = 2800; f[n_] := Sum[Prime[k], {k, 1, n}]; p[n_] := If[PrimeQ[f[n]/3], 1, 0]; t = Table[p[n], {n, 1, z}]; Flatten[Position[t, 1]]
Previous Showing 21-30 of 38 results. Next