login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249341 Positions of ones in A249337; positions of zeros in A249072. 5

%I #9 Oct 26 2014 20:51:08

%S 1,3,7,14,21,40,46,71,81,98,122,146,194,241,258,297,323,380,401,433,

%T 482,491,533,567,633,716,761,767,808,836,879,1068,1105,1210,1216,1370,

%U 1415,1469,1515,1541,1606,1684,1707,1854,1872,1906,1936,2117,2277,2294,2305,2344

%N Positions of ones in A249337; positions of zeros in A249072.

%H Antti Karttunen, <a href="/A249341/b249341.txt">Table of n, a(n) for n = 1..10000</a>

%F For all n >= 2: a(n) = A249342(n) + 1.

%o (PARI)

%o allocatemem(234567890);

%o A049084(n) = if(isprime(n), primepi(n), 0); \\ This function from _Charles R Greathouse IV_

%o A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * A049084(f[i,1]))); }

%o 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_write_bfile(10000);

%o (Scheme, with _Antti Karttunen_'s IntSeq-library, two alternative definitions)

%o (define A249341 (MATCHING-POS 1 1 (lambda (n) (= 1 (A249337 n)))))

%o (define A249341 (ZERO-POS 1 1 A249072))

%Y After the initial term, one more than A249342.

%Y Cf. A249337, A249339, A249072.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 26 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)