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.
%I A383970 #19 Jun 09 2025 00:23:25 %S A383970 0,1,1,2,0,4,2,2,0,5,2,3,2,3,3,4,5,4,3,2,2,6,6,2,2,4,4,6,6,4,4,2,2,4, %T A383970 2,2,6,6,2,2,4,4,6,6,2,2,4,4,4,2,2,4,2,0,12,6,4,6,6,4,6,6,4,4,2,2,6,6, %U A383970 2,2,4,4,6,6,4,4,2,2,4,2,2,6,6,2,2,4,4 %N A383970 Inventory sequence: record the number of prior terms such that if 2 then 4, then 6,... are added the result is a prime. Reset the count at each term = 0. %H A383970 Michael De Vlieger, <a href="/A383970/b383970.txt">Table of n, a(n) for n = 1..10000</a> %e A383970 Initially there are no terms in the sequence which satisfy any condition so a(1) = 0, whereupon the count is reset. Now count the number of prior terms such that the addition of 2 gives a prime. Since 0 + 2 = 2 is prime, a(2) = 1, and we increment from 2 to 4 finding that 1+4 = 5 is prime thus a(3) = 1. Since adding 6 to all prior terms gives 6,7,7 two of which are prime, we have a(4) = 2. Adding 8 to all prior terms results in 8,9,10,8 which contains no primes, so a(5) = 0; and so on. %t A383970 s = {0}; q = 0; Do[k = Count[s + 2*(n - q), _?PrimeQ]; AppendTo[s, k]; If[k == 0, q = n], {n, 120}]; s (* _Michael De Vlieger_, May 16 2025 *) %Y A383970 Cf. A342585, A383969. %K A383970 nonn %O A383970 1,4 %A A383970 _David James Sycamore_, May 16 2025