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!)
A096095 Digital Fibonacci numbers: a(0) = a(1) = 1; a(n+2) = a(n) ++ a(n+1) where ++ stands for digit-wise sum (with no carries). 2

%I #19 Mar 19 2019 03:57:41

%S 1,1,2,3,5,8,13,111,124,235,359,5814,511613,5161427,567210310,

%T 5612371737,511795811047,5161310711827714,51618211410616387511,

%U 51611337272013271110141225,5161138888102246817264128736,5111274911111537425910883742699511,511127910722491311155271156169109106711171247

%N Digital Fibonacci numbers: a(0) = a(1) = 1; a(n+2) = a(n) ++ a(n+1) where ++ stands for digit-wise sum (with no carries).

%C In case corresponding digits add to a 2-digit number, the "1" is inserted instead of being added to the next higher significant digit. - _M. F. Hasler_, Apr 18 2009

%C A197945(n) = length of longest common prefix of a(n) and a(n+1). [_Reinhard Zumkeller_, Oct 19 2011]

%H Reinhard Zumkeller, <a href="/A096095/b096095.txt">Table of n, a(n) for n = 0..36</a>

%F frac( log[10]( a(n) )) tends to 0.7085296011388705685015..., i.e. the first digits 51112791588989116125412156111... eventually remain the same, since on the average a(n+1) has about 1/6 of digits more than a(n). - _M. F. Hasler_, Apr 18 2009

%e a(8) = a(6) ++ a(7) = 08 ++ 13 = concatenation of (0+1 = 1 and 8+3 = 11) = 111.

%e a(9) = a(7) ++ a(8) = 013 ++ 111 =124.

%t nxt[{a_,b_}]:={b,FromDigits[Flatten[ IntegerDigits/@ (PadLeft[ IntegerDigits[ a], IntegerLength[ b],0] + IntegerDigits[b])]]}; Transpose[ NestList[ nxt,{1,1},25]][[1]] (* _Harvey P. Dale_, Dec 16 2012 *)

%o (PARI) a=[1,1]; for(n=2,30, a=concat(a,a[n]+a[n-1]); my(p=10^#Str(a[n])); while(p\=10, a[n]\p%10+a[n-1]\p%10 > 9 & a[n+1]+=(a[n+1]\p\10-1)*90*p));a \\ _M. F. Hasler_, Apr 18 2009

%o (Haskell)

%o import Data.List (unfoldr)

%o a096095 n = a096095_list !! n

%o a096095_list = 1 : 1 : zipWith dadd a096095_list (tail a096095_list) where

%o dadd x y = foldl (\v d -> (if d < 10 then 10 else 100)*v + d)

%o 0 $ reverse $ unfoldr f (x,y) where

%o f (x,y) | x + y == 0 = Nothing

%o | otherwise = Just (xd + yd, (x',y'))

%o where (x',xd) = divMod x 10; (y',yd) = divMod y 10

%o -- _Reinhard Zumkeller_, Oct 19 2011

%Y Cf. A000045, A197945.

%K base,nice,nonn

%O 0,3

%A _Amarnath Murthy_, Jun 24 2004

%E Edited and extended beyond a(12) by _M. F. Hasler_, Apr 18 2009

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 17 22:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)