%I #37 Aug 13 2023 02:45:35
%S 1,3,7,23,87,1111,5207,70743,332887,4527191,272962647,1346704471,
%T 70066181207,1169577808983,5567624320087,75936368497751,
%U 4579535995868247,292809912147579991,1445731416754426967,75232707711592633431,1255824328429003936855,5978190811298649150551
%N a(1)=1; thereafter, a(n+1) = a(n) + 2^(prime(n)-1).
%C 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.
%C 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.
%C 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
%H Vincenzo Librandi, <a href="/A080355/b080355.txt">Table of n, a(n) for n = 1..475</a>
%H Tomasz Ordowski, <a href="http://list.seqfan.eu/pipermail/seqfan/2018-October/033643.html">Primes in primes</a>, SeqFan list, Oct 28 2018.
%F a(n) = 1 + Sum_{k=1..n-1} 2^(prime(k)-1).
%F a(n) = A076793(n-1) / 2 + 1. - _Georg Fischer_, Aug 12 2023
%p a:=n->1+add(2^(ithprime(k)-1),k=1..n-1): seq(a(n),n=1..25); # _Muniru A Asiru_, Oct 31 2018
%t RecurrenceTable[{a[1]==1, a[n] == 2^(Prime[n-1] - 1) + a[n-1]}, a, {n, 25}] (* _Vincenzo Librandi_, Oct 31 2018 *)
%t nxt[{n_,a_}]:={n+1,a+2^(Prime[n]-1)}; NestList[nxt,{1,1},30][[All,2]] (* _Harvey P. Dale_, Aug 07 2019 *)
%o (PARI) apply( A080355(n)=1+sum(i=1,n-1,2^(prime(i)-1)), [1..50]) \\ _M. F. Hasler_, Oct 30 2018
%o (Magma) [n le 1 select 1 else Self(n-1) + 2^(NthPrime(n-1)-1): n in [1..25]]; // _Vincenzo Librandi_, Oct 31 2018
%Y Cf. A076793.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_, based on information supplied by _Artur Jasinski_, Mar 21 2003
%E More terms from _Vladeta Jovovic_, Mar 26 2003