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-2 of 2 results.

A159261 Primes of the form 1 + sum_{i=1..n} 2^prime[i] for some n.

Original entry on oeis.org

5, 13, 173, 2111, 665773, 3142394278117397493736691789093238367784438314557856426157
Offset: 1

Views

Author

T. D. Noe, Apr 07 2009

Keywords

Comments

Primes whose binary representation has the 0 and prime bits set up to prime(n). The values of n are in A159260.

Programs

  • Mathematica
    s=1; Reap[Do[s=s+2^Prime[n]; If[PrimeQ[s], Sow[s]], {n,50}]][[2,1]]

A277123 Numbers k such that 1 + Sum_{j=1..k} prime(j)^2 is prime.

Original entry on oeis.org

1, 11, 19, 29, 37, 73, 97, 155, 163, 175, 191, 257, 295, 313, 325, 341, 365, 389, 391, 409, 415, 461, 491, 497, 515, 599, 697, 715, 757, 761, 767, 775, 785, 793, 857, 875, 895, 899, 905, 919, 1099, 1109, 1117, 1139, 1151, 1163, 1225, 1271, 1279, 1295, 1309
Offset: 1

Views

Author

Alex Ratushnyak, Sep 30 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Position[Accumulate[Prime[Range[2000]]^2]+1,?PrimeQ]//Flatten (* _Harvey P. Dale, Sep 07 2019 *)
  • PARI
    lista(nn) = for(n=1, nn, if(isprime(1+sum(i=1, n, prime(i)^2)), print1(n, ", "))); \\ Altug Alkan, Oct 01 2016
  • Python
    import sympy
    sum = p = 1
    for n in range(1,3001):
      while not sympy.isprime(p):  p+=1    # find the n'th prime
      sum += p*p
      p+=1
      if sympy.isprime(sum):  print(n, end=', ')
    
Showing 1-2 of 2 results.