|
|
A086769
|
|
a(n) = sum{2^(b(i)-1): 1<=i<=n}, where b(n) is the differences between consecutive primes.
|
|
1
|
|
|
1, 3, 5, 13, 15, 23, 25, 33, 65, 67, 99, 107, 109, 117, 149, 181, 183, 215, 223, 225, 257, 265, 297, 425, 433, 435, 443, 445, 453, 8645, 8653, 8685, 8687, 9199, 9201, 9233, 9265, 9273, 9305, 9337, 9339, 9851, 9853, 9861, 9863, 11911, 13959, 13967, 13969
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1)+2^(p(n+1)-p(n)-1).
|
|
EXAMPLE
|
2^(3-2)/2=1, so a(1)=1. 2^(5-3)/2=2, so a(2)=1+2=3.
|
|
MATHEMATICA
|
Accumulate[2^(#-1)&/@Differences[Prime[Range[50]]]] (* Harvey P. Dale, Aug 10 2024 *)
|
|
PROG
|
(MATLAB) P = primes(500); l = length(P); S = P(2:l) - P(1:(l - 1)); A = cumsum(2.^(S-1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
David G. Williams (davwill24(AT)aol.com), Aug 02 2003
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|