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!)
A125835 Numbers whose base-8 or octal representation is 22222222.......2. 5
0, 2, 18, 146, 1170, 9362, 74898, 599186, 4793490, 38347922, 306783378, 2454267026, 19634136210, 157073089682, 1256584717458, 10052677739666, 80421421917330, 643371375338642, 5146971002709138, 41175768021673106, 329406144173384850, 2635249153387078802, 21081993227096630418 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = 2*(8^(n-1) - 1)/7.
a(n) = 8*a(n-1) + 2, with a(1)=0. - Vincenzo Librandi, Sep 30 2010
From G. C. Greubel, Aug 03 2019: (Start)
a(n) = 2*A023001(n).
G.f.: 2*x^2/((1-x)*(1-8*x)).
E.g.f.: 2*(exp(8*x) - exp(x))/7. (End)
EXAMPLE
Octal.............decimal
0.......................0
2.......................2
22.....................18
222...................146
2222.................1170
22222................9362
222222..............74898
2222222............599186
22222222..........4793490
222222222........38347922
2222222222......306783378
etc. ...............etc.
MAPLE
seq(2*(8^n-1)/7, n=0..30);
MATHEMATICA
nxt2[n_]:=Module[{idn=IntegerDigits[n, 8]}, FromDigits[PadLeft[idn, Length[idn]+1, 2], 8]]; Join[{0}, NestList[nxt2, 2, 30]] (* Harvey P. Dale, Mar 09 2011 *)
Module[{nn=30, c}, c=PadRight[{}, nn, 2]; Table[FromDigits[Take[c, n], 8], {n, 0, nn}]] (* Harvey P. Dale, Sep 05 2015 *)
2*(8^(Range[30]-1) -1)/7 (* G. C. Greubel, Aug 03 2019 *)
PROG
(PARI) a(n)=2*(1<<(3*n-3)\7) \\ Charles R Greathouse IV, Mar 09 2011
(PARI) vector(30, n, 2*(8^(n-1) -1)/7) \\ G. C. Greubel, Aug 03 2019
(Magma) [2*(8^(n-1) -1)/7: n in [1..30]]; // G. C. Greubel, Aug 03 2019
(Sage) [2*(8^(n-1) -1)/7 for n in (1..30)] # G. C. Greubel, Aug 03 2019
(GAP) List([1..30], n-> 2*(8^(n-1) -1)/7); # G. C. Greubel, Aug 03 2019
CROSSREFS
Cf. A023001.
Sequence in context: A208654 A037565 A329170 * A356623 A091170 A207319
KEYWORD
easy,nonn
AUTHOR
Zerinvary Lajos, Feb 03 2007
EXTENSIONS
Offset corrected by N. J. A. Sloane, Oct 02 2010
Terms a(21) onward added by G. C. Greubel, Aug 03 2019
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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)