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.

A080355 a(1)=1; thereafter, a(n+1) = a(n) + 2^(prime(n)-1).

Original entry on oeis.org

1, 3, 7, 23, 87, 1111, 5207, 70743, 332887, 4527191, 272962647, 1346704471, 70066181207, 1169577808983, 5567624320087, 75936368497751, 4579535995868247, 292809912147579991, 1445731416754426967, 75232707711592633431, 1255824328429003936855, 5978190811298649150551
Offset: 1

Views

Author

N. J. A. Sloane, based on information supplied by Artur Jasinski, Mar 21 2003

Keywords

Comments

Original name: a(1)=1; for n>1, a(n) = a(n-1) + 2^(j-1), where j = prime(n-1) is position of n-th 1 in A080339.
Or, take an initial segment of A080339, stopping at the n-th 1, reverse and interpret as a binary number. E.g., to get the 4th term: 11101 -> 10111 = 23, so a(4) = 23.
Indices of noncomposite terms in the sequence are 1, 2, 3, 4, 9, 310, 418, .... Next term (i.e., index of a prime), if it exists, is > 2000. See also post to SeqFan list by Tomasz Ordowski. - M. F. Hasler, Oct 30 2018

Crossrefs

Cf. A076793.

Programs

  • Magma
    [n le 1 select 1 else Self(n-1) + 2^(NthPrime(n-1)-1): n in [1..25]]; // Vincenzo Librandi, Oct 31 2018
  • Maple
    a:=n->1+add(2^(ithprime(k)-1),k=1..n-1): seq(a(n),n=1..25); # Muniru A Asiru, Oct 31 2018
  • Mathematica
    RecurrenceTable[{a[1]==1, a[n] == 2^(Prime[n-1] - 1) + a[n-1]}, a, {n, 25}] (* Vincenzo Librandi, Oct 31 2018 *)
    nxt[{n_,a_}]:={n+1,a+2^(Prime[n]-1)}; NestList[nxt,{1,1},30][[All,2]] (* Harvey P. Dale, Aug 07 2019 *)
  • PARI
    apply( A080355(n)=1+sum(i=1,n-1,2^(prime(i)-1)), [1..50]) \\ M. F. Hasler, Oct 30 2018
    

Formula

a(n) = 1 + Sum_{k=1..n-1} 2^(prime(k)-1).
a(n) = A076793(n-1) / 2 + 1. - Georg Fischer, Aug 12 2023

Extensions

More terms from Vladeta Jovovic, Mar 26 2003