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!)
A007943 Concatenation of sequence (1,3,..,2n-1,2n,2n-2,..,2). 1
12, 1342, 135642, 13578642, 13579108642, 135791112108642, 1357911131412108642, 13579111315161412108642, 135791113151718161412108642, 1357911131517192018161412108642 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
REFERENCES
M. Le, Perfect Powers in the Smarandache Permutation Sequence, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 148-149.
LINKS
FORMULA
a(n) = a1 + a2 + a3 where a1 = floor(a(n-1)/10^d)*10^floor(1 + log_10(a2)), a2 = ((2*n-1)*10^floor(1 + log_10(2*n)) + 2*n)*10^floor(1 + log_10(a3)), a3 = a(n-1) - floor(a(n-1)/10^d)*10^floor(d), d = (floor(1 + log_10(a(n-1))) + (1 + (-1)^floor(1 + log_10(2*(n-1))))/2)/2 + w, w = (floor(1 + log_10(2*n-1)) - 1 - (1 - (-1)^(floor(1 + log_10(2*n-1)) - 1))/2)/2. - Paolo P. Lava, Jun 17 2008
MAPLE
P:=proc(n) local a, a1, a2, a3, d, i, w; a:=12; print(a); for i from 2 by 1 to n do w:=(floor(evalf(1+log10(2*i-1), 1000))-1-(1-(-1)^(floor(evalf(1+log10(2*i-1), 1000))-1))/2)/2; d:=(floor(evalf(1+log10(a), 1000))+(1+(-1)^floor(evalf(1+log10(2*(i-1)), 1000)))/2)/2+w; a3:=a-floor(evalf(a/(10^d), 1000))*10^floor(evalf(d, 1000)); a2:=((2*i-1)*10^floor(evalf(1+log10(2*i), 1000))+2*i)*10^floor(evalf(1+log10(a3), 1000)); a1:=floor(evalf(a/(10^d), 1000))*10^floor(evalf(1+log10(a2), 1000)); a:=a1+a2+a3; print(a); od; end: P(1000); # Paolo P. Lava, Jun 17 2008
MATHEMATICA
Table[FromDigits[Join[Flatten[IntegerDigits/@Range[1, 2n+1, 2]], Flatten[ IntegerDigits/@ Range[2n+2, 2, -2]]]], {n, 0, 10}] (* Harvey P. Dale, Jul 30 2021 *)
CROSSREFS
Cf. A007942.
Sequence in context: A071309 A067108 A240627 * A015512 A004145 A296609
KEYWORD
nonn,base
AUTHOR
R. Muller
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 June 8 18:04 EDT 2023. Contains 363165 sequences. (Running on oeis4.)