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 A249341 #13 Feb 07 2025 15:36:00 %S A249341 1,3,7,14,21,40,46,71,81,98,122,146,194,241,258,297,323,380,401,433, %T A249341 482,491,533,567,633,716,761,767,808,836,879,1068,1105,1210,1216,1370, %U A249341 1415,1469,1515,1541,1606,1684,1707,1854,1872,1906,1936,2117,2277,2294,2305,2344 %N A249341 Positions of ones in A249337; positions of zeros in A249072. %H A249341 Antti Karttunen, <a href="/A249341/b249341.txt">Table of n, a(n) for n = 1..10000</a> %F A249341 For all n >= 2: a(n) = A249342(n) + 1. %o A249341 (PARI) %o A249341 allocatemem(234567890); %o A249341 A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from _Charles R Greathouse IV_ %o A249341 A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * A049084(f[i,1]))); } %o A249341 A249341_write_bfile(up_to_n) = { my(counts, n, k, a_k); counts = vector(min((2^24)-8,up_to_n^2)); n = 0; k = 0; a_k = 1; while(n < up_to_n, k++; if((1 == a_k), n++; write("b249341.txt", n, " ", k)); counts[1+A056239(a_k)]++; if(1 == k, a_k = 2, a_k = counts[1+A056239(a_k)])); }; %o A249341 A249341_write_bfile(10000); %o A249341 (Scheme) ;; With _Antti Karttunen_'s IntSeq-library, two alternative definitions. %o A249341 (define A249341 (MATCHING-POS 1 1 (lambda (n) (= 1 (A249337 n))))) %o A249341 (define A249341 (ZERO-POS 1 1 A249072)) %Y A249341 After the initial term, one more than A249342. %Y A249341 Cf. A249337, A249339, A249072. %K A249341 nonn %O A249341 1,2 %A A249341 _Antti Karttunen_, Oct 26 2014