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.

A355438 Lucas(a(n)) is least Lucas number beginning with n.

This page as a plain text file.
%I A355438 #18 Jul 08 2022 11:24:14
%S A355438 1,0,2,3,13,23,4,14,19,24,5,10,15,39,20,25,49,6,11,35,59,16,64,21,45,
%T A355438 69,26,50,7,31,55,12,36,60,17,151,41,65,22,156,46,70,27,94,51,252,8,
%U A355438 32,166,56,190,13,281,37,305,61,18,85,42,109,310,66,267,23,224,47,181,71,138,339
%N A355438 Lucas(a(n)) is least Lucas number beginning with n.
%H A355438 Michael S. Branicky, <a href="/A355438/b355438.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..4000 from Michel Marcus)
%H A355438 Ron Knott, <a href="https://r-knott.surrey.ac.uk/Fibonacci/fibmaths.html#section8">Every number starts some Fibonacci Number</a>, The Mathematical Magic of the Fibonacci Numbers.
%F A355438 Trivially a(n) >= log_phi(n-1) for n > 1. Probably upper bounds are obtainable using the theory of linear forms in logarithms. - _Charles R Greathouse IV_, Jul 08 2022
%o A355438 (PARI) L(n) = real((2 + quadgen(5)) * quadgen(5)^n); \\ A000032
%o A355438 isok(k, dn) = my(dk=digits(L(k))); if (#dk >= #dn, Vec(dk, #dn) == dn);
%o A355438 a(n) = my(k=0, dn=digits(n)); while (!isok(k, dn), k++); k;
%o A355438 (Python)
%o A355438 def aupton(nn):
%o A355438     ans, f, g, k = dict(), 2, 1, 0
%o A355438     while len(ans) < nn:
%o A355438         sf = str(f)
%o A355438         for i in range(1, len(sf)+1):
%o A355438             if int(sf[:i]) > nn:
%o A355438                 break
%o A355438             if sf[:i] not in ans:
%o A355438                 ans[sf[:i]] = k
%o A355438         f, g, k = g, f+g, k+1
%o A355438     return [int(ans[str(i)]) for i in range(1, nn+1)]
%o A355438 print(aupton(70)) # _Michael S. Branicky_, Jul 08 2022
%Y A355438 Cf. A000032, A355439,
%Y A355438 Cf. A020344, A020345.
%K A355438 nonn,base,look
%O A355438 1,3
%A A355438 _Michel Marcus_, Jul 02 2022