The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A182580 Position of first occurrence of n in A182576. 1

%I #10 May 07 2012 14:07:44

%S 0,1,2,5,11,27,29,46,76,167,133,348,521,1160,1364,3005,3571,9348,9349,

%T 20820,24476,64062,64079,123651,167761,439203,439204,1149850,1149851,

%U 3010348,3010349,7881195,7881196,20633238,20633239,54018520,54018521,141422323,141422324

%N Position of first occurrence of n in A182576.

%C Conjecture: for k > 12, a(2k) = a(2k-1) + 1.

%e First occurrence of 4 in A182576(n) has index 11, so a(4)=11.

%o (C)

%o #include <stdio.h> // GCC // ~880 secs

%o typedef unsigned long long U64;

%o U64 fibs[992], first[992], prpr=0, prev=1, current, n, sq;

%o long long ftop, fpos, terms;

%o int main(int argc, char **argv)

%o {

%o for (ftop=0; ftop<900; ++ftop) {

%o fibs[ftop] = current = prpr+prev;

%o if (current<prev) break;

%o prpr = prev, prev = current;

%o }

%o printf("%llu\n%llu\n%llu\n%llu\n",ftop,prev,prpr,(U64)-1-prev);

%o for (n=0; n < ((U64)1<<32); ++n) {

%o fpos=ftop-1, terms=0;

%o for (sq=n*n; sq>0 && fpos>=0; ++terms, sq-=fibs[fpos], --fpos) {

%o while (fibs[fpos]>sq && fpos>0) --fpos;

%o }

%o if (sq>0) { printf("Error!"); exit(1); }

%o if (first[terms]==0)

%o first[terms]=n, printf("%2llu %llu\n",terms,n);

%o }

%o for (n=0; n<ftop; ++n) printf("%llu, ", first[n]);

%o return 0;

%o }

%Y Cf. A182576.

%K nonn

%O 0,3

%A _Alex Ratushnyak_, May 05 2012

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 June 4 19:35 EDT 2024. Contains 373102 sequences. (Running on oeis4.)