cp's OEIS Frontend

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.

A246399 Least k such that A249783(k) = n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

It appears that a(n) exists for each n, and that the sequence is increasing.

Examples

			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.)
		

Crossrefs

Programs

  • 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[BA249783[k] == n, Return[k]]]; Array[a, 50] (* Jean-François Alcover, Jan 06 2017, adapted from PARI *)
  • 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=least&&t<=#v&&v[t]==0,v[t]=n;while(v[least],if(least++>#v,return(v)))))