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.

Showing 1-2 of 2 results.

A053064 Alternately append n to end or beginning of previous term.

Original entry on oeis.org

1, 12, 312, 3124, 53124, 531246, 7531246, 75312468, 975312468, 97531246810, 1197531246810, 119753124681012, 13119753124681012, 1311975312468101214, 151311975312468101214, 15131197531246810121416, 1715131197531246810121416, 171513119753124681012141618
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

A055642(a(n)) = A058183(n); A007953(a(n)) = A037123(n); A010879(a(n)) = A010879(2*floor(n/2)) = A010879(A131055(n)); A000030(a(n)) = A000030(ceiling(n/2)). - Reinhard Zumkeller, Oct 10 2008

References

  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press 2000

Crossrefs

Extensions

More terms from Sean A. Irvine, Dec 05 2021

A281254 Concatenate the decimal numbers n n-2 n-4 ...5 3 1 2 4 ... n-5 n-3 n-1 if n is odd, or n n-2 n-4 ... 6 4 2 1 3 5 ... n-5 n-3 n-1 if n is even.

Original entry on oeis.org

1, 21, 312, 4213, 53124, 642135, 7531246, 86421357, 975312468, 10864213579, 1197531246810, 121086421357911, 13119753124681012, 1412108642135791113, 151311975312468101214, 16141210864213579111315, 1715131197531246810121416
Offset: 1

Views

Author

Robert G. Wilson v, Jan 18 2017

Keywords

Comments

The old name was "Alternately concatenate the decimal digits from back to front 1...n such that n is always to the left.".
a(40714), with 192464 decimal digits, is the sequence's first (probable) prime. - Hans Havermann, Dec 17 2019
The terms at even indices are the same as the even-indexed terms of A053063. - Hans Havermann, Jan 16 2020

Examples

			a(13) = 13119753124681012.
		

Crossrefs

See A053063 for another version.

Programs

  • Maple
    b:= proc(n) b(n):= `if`(n=1, 1, parse(cat(a(n-1), n))) end:
    a:= proc(n) a(n):= `if`(n=1, 1, parse(cat(n, b(n-1)))) end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Jan 18 2017
  • Mathematica
    f[n_] := Fold[ If[ Mod[n +#2, 2] == 0, #2, #1]*10^IntegerLength@ If[ Mod[n +#2, 2] == 0, #1, #2] +If[ Mod[n +#2, 2] == 1, #2, #1] &, 0, Range@ n]; Array[f, 17]
  • Python
    def a(n):
        if n==1:
            return ["1"]
        return [str(n)]+a(n-1)[::-1]
    def A281254(n):
        return "".join(a(n)) # Indranil Ghosh, Jan 23 2017

Extensions

Edited by N. J. A. Sloane, Dec 07 2019
Showing 1-2 of 2 results.