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!)
A246399 Least k such that A249783(k) = n. 1
1, 4, 7, 12, 17, 22, 27, 43, 51, 59, 67, 75, 83, 122, 135, 148, 161, 174, 187, 200, 213, 226, 239, 344, 365, 386, 407, 428, 449, 470, 491, 512, 533, 554, 575, 596, 617, 638, 659, 931, 965, 999, 1033, 1067, 1101, 1135, 1169, 1203, 1237, 1271 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
It appears that a(n) exists for each n, and that the sequence is increasing.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
EXAMPLE
a(3) = 7 because the Fibonacci-like sequence 2, 1, 3, 4, 7, 11, ... contains 7 and the sum of the first two terms is 3, while no smaller sequences work. (All terms must be nonnegative.)
MATHEMATICA
A249783[n_] := A249783[n] = Module[{a, k, A, B}, If[n<2, Return[n]]; For[k = 1, k <= n-1, k++, For[a=0, a <= k-1, a++, A = a; B = k-A; While[B<n, {A, B} = {B, A+B}]; If[B==n, Return[k]]]]; n]; a[1]=1; a[n_] := a[n] = For[k = a[n-1], True, k++, If[A249783[k] == n, Return[k]]]; Array[a, 50] (* Jean-François Alcover, Jan 06 2017, adapted from PARI *)
PROG
(PARI) A054495(n)=fordiv(n, d, if(A010056(n/d), return(d)))
A249783(n)=if(n<2, return(n)); for(k=1, n-1, for(a=0, k-1, my(A=a, B=k-A); while(B<n, [A, B]=[B, A+B]); if(B==n, return(k)))); n
v=vector(100); least=1; for(n=1, 1e7, if(aa(n)<least, next); t=a(n); if(t>=least&&t<=#v&&v[t]==0, v[t]=n; while(v[least], if(least++>#v, return(v)))))
CROSSREFS
Sequence in context: A310789 A310790 A310791 * A276222 A074148 A336660
KEYWORD
nonn
AUTHOR
STATUS
approved

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 May 20 21:47 EDT 2024. Contains 372720 sequences. (Running on oeis4.)