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 A249339 #11 Feb 07 2025 14:32:01 %S A249339 1,2,4,6,14,21,40,51,71,81,98,132,143,194,241,258,297,323,380,398,436, %T A249339 479,491,543,570,630,737,759,765,829,836,873,1068,1101,1210,1215,1370, %U A249339 1415,1469,1515,1550,1607,1682,1701,1854,1872,1904,1932,2117,2245,2294,2304,2344 %N A249339 Positions of ones in A249336; positions of zeros in A249338. %H A249339 Antti Karttunen, <a href="/A249339/b249339.txt">Table of n, a(n) for n = 1..10000</a> %F A249339 For n >= 2, a(n) = 1 + A249340(n-1). %o A249339 (PARI) %o A249339 allocatemem(234567890); %o A249339 A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from _Charles R Greathouse IV_ %o A249339 A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * A049084(f[i,1]))); } %o A249339 A249339_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((0 == A056239(a_k)), n++; write("b249339.txt", n, " ", k)); counts[1+A056239(a_k)]++; a_k = counts[1+A056239(a_k)]); }; %o A249339 A249339_write_bfile(10000); %o A249339 (Scheme) ;; With _Antti Karttunen_'s IntSeq-library, two alternative definitions. %o A249339 (define A249339 (MATCHING-POS 1 1 (lambda (n) (= 1 (A249336 n))))) %o A249339 (define A249339 (ZERO-POS 1 1 A249338)) %Y A249339 Cf. A249336, A249338, A249340, A249341. %K A249339 nonn %O A249339 1,2 %A A249339 _Antti Karttunen_, Oct 26 2014