OFFSET
1,1
COMMENTS
If there are k consecutive natural numbers and all of them are members of A000378, then the maximum value of k is 7. So if we randomly choose 2*7+1 consecutive natural numbers, at least one of them must be member of A004215. This sequence gives the average of 15 consecutive natural numbers in the case there is exactly one member from A004215 in these 15 consecutive natural numbers. In other words, this sequence gives the most isolated terms of A004215.
Numbers n which are 7 mod 16 such that n+5 and n-7 are sums of three squares, together with numbers n which are 15 mod 16 such that n+1 and n-3 are sums of three squares. - Charles R Greathouse IV, Apr 25 2016
EXAMPLE
15 is a term because 8, 9, 10, 11, 12, 13, 14 and 16, 17, 18, 19, 20, 21, 22 are consecutive members of A000378.
MATHEMATICA
Take[#, {2}] & /@ Select[#, Union@ Differences@ # == {8} &] &@ Partition[#, 3, 1] &@ Select[Range@ 1200, Mod[#/4^IntegerExponent[#, 4], 8] == 7 &] // Flatten (* Michael De Vlieger, Apr 25 2016, after Ant King at A004215 *)
PROG
(PARI) isA004215(n)=(n>>(2*valuation(n, 4)))%8==7
is(n)=my(m=n%16); n>9 && if(m==7, !isA004215(n+5) && !isA004215(n-7), m==15 && !isA004215(n+1) && !isA004215(n-3)) \\ Charles R Greathouse IV, Apr 25 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Apr 22 2016
STATUS
approved