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

A113879 a(n) = 1+A113878(n).

Original entry on oeis.org

1, 2, 3, 5, 8, 17, 54, 67, 208, 1753, 5042, 6311
Offset: 1

Views

Author

Artur Jasinski, Jan 27 2006

Keywords

Crossrefs

Cf. A113824.

Formula

Sum_{n>=1} 1/(2^a(n)) = 1/2+1/(2^2)+1/(2^3)+1/(2^5)+1/(2^8)+... = 0.910163879394531305517927948...

Extensions

Simplified definition - R. J. Mathar, Oct 01 2009

A259630 a(n) is the smallest integer not occurring earlier such that 2^a(1) + 2^a(2) + ... + 2^a(n) is a prime.

Original entry on oeis.org

1, 0, 2, 4, 3, 12, 5, 14, 27, 8, 25, 30, 31, 36, 13, 18, 131, 60, 133, 458, 247, 1040, 21, 618, 283, 300, 209, 6282, 19107, 11792, 3401, 30214, 1211, 3044, 15989, 30194
Offset: 1

Views

Author

Thomas Ordowski, Sep 24 2015

Keywords

Comments

Is this sequence infinite?
Associated primes: A059661.
Essentially the same as A059662: 1 followed by A059662. - R. J. Mathar, Oct 09 2015
a(37) > 145000. - Giovanni Resta, Jul 01 2019

Examples

			a(1) = 1 since 2^0 = 1 is not prime, but 2^1 = 2 is prime.
a(2) = 0 since 2^1 + 2^0 = 2 + 1 = 3 is prime.
a(3) = 2 since 2^1 + 2^0 + 2^2 = 2 + 1 + 4 = 7 is prime.
		

Crossrefs

Programs

  • PARI
    findsm(va, n) = {m = 0; ok = 0; vs = vecsort(va); sa = sum(k=1, #va, 2^va[k]); while (!ok, if (! vecsearch(vs, m), ns = sa + 2^m; if (isprime(ns), ok = 1; break);); m++;); m;}
    lista(nn) = {va = []; for (n=1, nn, m = findsm(va, n); va = concat(va, m); print1(m, ", "););} \\ Michel Marcus, Sep 26 2015
    
  • Python
    from sympy import isprime
    A259630_list, A259630_set, k = [], set(), 0
    while len(A259630_list) < 50:
        n, m = 0,1
        k += m
        while n in A259630_set or not isprime(k):
            n += 1
            k += m
            m *= 2
        A259630_list.append(n)
        A259630_set.add(n) # Chai Wah Wu, Jun 27 2019

Extensions

a(18)-a(25) from Michel Marcus, Sep 26 2015
a(26)-a(28) from Joerg Arndt (with ispseudoprime() in Pari), Sep 28 2015
a(29)-a(34) from Chai Wah Wu, Jun 27 2019
a(35)-a(36) from Giovanni Resta, Jun 30 2019

A321084 Primes prime(n) such that 1 + Sum_{k=1..n} 2^(prime(k)-1) is prime.

Original entry on oeis.org

2, 3, 5, 19, 2039, 2879
Offset: 1

Views

Author

Thomas Ordowski, Oct 27 2018

Keywords

Comments

Primes prime(n) such that A080355(n+1) is prime.
The prime p = 19 gives the prime 332887 = 1010001010001010111_2.
The positions of 1's from the end are 1, 2, 3, 5, 7, 11, 13, 17, 19.
Let S(n) = Sum_{k=1..n} 2^(prime(k)-1). Conjecture: q(n) = 1 + S(n) is prime if and only if 2^S(n) == 1 (mod q(n)).

Examples

			a(3) = 5 since 1 + 2^(2-1) + 2^(3-1) + 2^(5-1) = 10111_2 = 23 is prime.
Note that prime(3) = 5 and A080355(3+1) = 23 prime.
		

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^3], PrimeQ[1 + Total@ Array[2^(Prime[#] - 1) &, #]] &] (* Michael De Vlieger, Oct 31 2018 *)
  • PARI
    isok(p) = isprime(p) && isprime(1 + sum(k=1, primepi(p), 2^(prime(k)-1))); \\ Michel Marcus, Oct 27 2018

Extensions

a(5)-a(6) from Robert Israel, Oct 27 2018
Showing 1-3 of 3 results.