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!)
A102039 a(n) = a(n-1) + last digit of a(n-1), starting at 1. 6

%I #37 Feb 23 2024 07:33:31

%S 1,2,4,8,16,22,24,28,36,42,44,48,56,62,64,68,76,82,84,88,96,102,104,

%T 108,116,122,124,128,136,142,144,148,156,162,164,168,176,182,184,188,

%U 196,202,204,208,216,222,224,228,236,242,244,248,256,262,264,268,276,282

%N a(n) = a(n-1) + last digit of a(n-1), starting at 1.

%C Sequence A001651 is the "base 3" version. In base 4 this rule leads to (1,2,4,4,4...), in base 5 to (1,2,4,8,11,12,14,18,21,22,24,28...) = A235700. - _M. F. Hasler_, Jan 14 2014

%C This and the following sequences (none of which is "base"!) could all be defined by a(1) = 1 and a(n+1) = a(n) + (a(n) mod b) with different values of b: A001651 (b=3), A235700 (b=5), A047235 (b=6), A047350 (b=7), A007612 (b=9). Using b=4 or b=8 yields a constant sequence from that term on. - _M. F. Hasler_, Jan 15 2014

%H Colin Barker, <a href="/A102039/b102039.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).

%F a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>5. G.f.: x*(5*x^4+2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). - _Colin Barker_, Sep 20 2014

%F a(n) = (-10 - (1-i/2)*(-i)^n - (1+i/2)*i^n + 5*n) for n>1, where i = sqrt(-1). - _Colin Barker_, Oct 18 2015

%e 28 + 8 = 36, 36 + 6 = 42.

%t LinearRecurrence[{2,-2,2,-1},{1,2,4,8,16},60] (* _Harvey P. Dale_, Jul 02 2022 *)

%o (PARI) print1(a=1);for(i=1,99,print1(","a+=a%10)) \\ _M. F. Hasler_, Jan 14 2014

%o (PARI) Vec(x*(5*x^4+2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ _Colin Barker_, Sep 20 2014

%o (PARI) a(n) = if(n==1, 1, (-10-(1-I/2)*(-I)^n-(1+I/2)*I^n+5*n)) \\ _Colin Barker_, Oct 18 2015

%Y Apart from initial term, same as A002081.

%K easy,nonn,base

%O 1,2

%A Samantha Stones (devilsdaughter2000(AT)hotmail.com), Dec 25 2004

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 18 08:27 EDT 2024. Contains 371769 sequences. (Running on oeis4.)