login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268287
a(n) shows how many times the sum of the hours and minutes is prime in an n-hour period starting from midnight.
0
0, 17, 34, 52, 69, 85, 101, 116, 131, 146, 161, 176, 191, 206, 221, 236, 251, 266, 281, 295, 309, 323, 337, 351, 365, 382, 399, 417, 434, 450, 466, 481, 496, 511, 526, 541, 556, 571, 586, 601, 616, 631, 646, 660, 674, 688, 702, 716, 730, 747, 764, 782, 799, 815, 831, 846, 861, 876, 891
OFFSET
0,2
COMMENTS
Partial sums of the sequence formed by repeating [17, 17, 18, 17, 16, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14]. - Michel Marcus, Feb 01 2016
EXAMPLE
In the first one-hour period, i.e. between 0:00 and 0:59, there are PrimePi(59) - PrimePi[0] = 17 primes, therefore a(1) = 17.
MATHEMATICA
days[n_]:=Floor[n/24]; hours[n_]:=n-24*days[n];
len[n_]:=If[hours[n]==0, 0, Length[Select[Flatten[Table[Table[h+m, {m, 0, 59}], {h, 0, hours[n]-1}]], PrimeQ]]];
total[n_]:=365*days[n]+len[n];
total/@Range[0, 100]
CROSSREFS
Cf. A000040.
Sequence in context: A033014 A070814 A188290 * A249988 A098365 A033899
KEYWORD
easy,nonn
AUTHOR
Ivan N. Ianakiev, Jan 30 2016
STATUS
approved