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.

Previous Showing 51-60 of 72 results. Next

A281253 Alternately concatenate the decimal digits from front to back 1...n such that n is always to the right.

Original entry on oeis.org

1, 12, 213, 3124, 42135, 531246, 6421357, 75312468, 864213579, 97531246810, 1086421357911, 119753124681012, 12108642135791113, 1311975312468101214, 141210864213579111315, 15131197531246810121416, 1614121086421357911131517
Offset: 1

Views

Author

Robert G. Wilson v, Jan 18 2017

Keywords

Comments

a(n) is prime for n: 121, 1399 and no others < 3000.

Examples

			a(13) = 12108642135791113.
		

Crossrefs

Programs

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

A050678 Index of first occurrence of n in A048288.

Original entry on oeis.org

82, 2, 5, 8, 9, 15, 17, 30, 26, 18, 91, 53
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1},Table[i=1; While[PrimeOmega[FromDigits[Flatten[IntegerDigits[Range[i,1,-1]]]]]!=n,i++]; i,{n,2,10}]] (* Jayanta Basu, May 30 2013 *)

Extensions

a(11)-a(12) from Sean A. Irvine, Aug 17 2021
Edited by N. J. A. Sloane, Sep 04 2021

A052246 Concatenation of integers from n down to 0.

Original entry on oeis.org

0, 10, 210, 3210, 43210, 543210, 6543210, 76543210, 876543210, 9876543210, 109876543210, 11109876543210, 1211109876543210, 131211109876543210, 14131211109876543210, 1514131211109876543210, 161514131211109876543210, 17161514131211109876543210
Offset: 0

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Crossrefs

Cf. A000422.

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(n, a(n-1)))) end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Jan 12 2021
  • Mathematica
    nn=20;With[{c=Range[nn,0,-1]},Table[FromDigits[Flatten[ IntegerDigits/@ Take[ c,-n]]],{n,nn}]] (* Harvey P. Dale, Feb 01 2013 *)
  • PARI
    a(n)=if(n==0, 0, eval(Str(n, a(n-1)))); \\ Joerg Arndt, Sep 14 2014

Formula

a(0)=0, a(n) = n*10^len(a(n-1)) + a(n-1), where len(k) = number of digits in k and len(0)=1.
a(n) = A000422(n)*10.

A053052 Append n to the previous term, reverse alternate terms.

Original entry on oeis.org

1, 21, 123, 4321, 12345, 654321, 1234567, 87654321, 123456789, 10987654321, 1234567891011, 121110987654321, 12345678910111213, 1413121110987654321, 123456789101112131415
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

References

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

Crossrefs

A078262 Sum of the forward and reverse concatenations of 1 to n.

Original entry on oeis.org

2, 33, 444, 5555, 66666, 777777, 8888888, 99999999, 1111111110, 23333333231, 2345555545332, 244567776755433, 25466789897765534, 2647689001998775635, 274869910212099785736, 28497092031222200795837, 2950719304132232301805938, 305172940514233242402816039
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Examples

			a(3) = 123 + 321 = 444, a(10) = 12345678910 + 10987654321 = 23333333231.
		

Crossrefs

Programs

  • Maple
    a:= n-> parse(cat(1+n-i$i=1..n))+parse(cat($1..n)):
    seq(a(n), n=1..18);  # Alois P. Heinz, Jun 25 2025
  • Mathematica
    Table[With[{c1=FromDigits[Flatten[IntegerDigits/@Range[n]]],c2= FromDigits[ Flatten[ IntegerDigits/@Range[n,1,-1]]]},c1+c2],{n,20}] (* Harvey P. Dale, Jul 03 2020 *)

Formula

a(n) = A000422(n) + A007908(n). - Sean A. Irvine, Jun 25 2025

Extensions

More terms from Sascha Kurz, Jan 04 2003

A078569 Numbers n such that A078568(n) is prime.

Original entry on oeis.org

1, 5, 25, 53, 370
Offset: 1

Views

Author

Jason Earls, Nov 29 2002

Keywords

Comments

Some of the larger entries may only correspond to probable primes.

Crossrefs

A095249 Reverse concatenation of first n positive integers modulo forward concatenation of first n positive integers.

Original entry on oeis.org

0, 9, 75, 619, 4941, 37041, 246919, 1234575, 9, 10987654321, 1110987654321, 121110987654321, 775432077543108, 178553219976533007, 27956332009875522906, 3805734210999774512805, 481583522109989673502704, 58259362312008979572492603, 6836037241301907969471482502
Offset: 1

Views

Author

Amarnath Murthy, Jun 17 2004

Keywords

Examples

			a(4) = 619 = 4321 mod 1234.
		

Crossrefs

Programs

  • Maple
    a:= n-> irem(parse(cat(n-i$i=0..n-1)), parse(cat(i$i=1..n))):
    seq(a(n), n=1..20);  # Alois P. Heinz, Nov 19 2018
  • Mathematica
    r = f = ""; Do[r = ToString[n] <> r; f = f <> ToString[n]; Print[Mod[ToExpression[r], ToExpression[f]]], {n, 1, 30}] (* Ryan Propper, Aug 26 2005 *)
    nn=30;Module[{r,f},Table[f=Flatten[IntegerDigits/@Range[n]]; r=Flatten[ IntegerDigits/@Range[n,1,-1]];Mod[FromDigits[r],FromDigits[f]],{n,nn}]] (* Harvey P. Dale, Mar 04 2013 *)

Formula

a(n) = A000422(n) mod A007908(n). - Michel Marcus, Nov 19 2018

Extensions

Corrected and extended by Ryan Propper, Aug 26 2005

A138794 a(n) = A138793(n+1)-A138793(n).

Original entry on oeis.org

20, 300, 4000, 50000, 600000, 7000000, 80000000, 900000000, 1000000000, 1100000000000, 210000000000000, 31000000000000000, 4100000000000000000, 510000000000000000000, 61000000000000000000000
Offset: 1

Views

Author

Artur Jasinski, Mar 30 2008

Keywords

Comments

First differences of A138793

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, p], {n, 1, 31}]; c = {}; Do[AppendTo[c, b[[n + 1]] - b[[n]]], {n, 1, Length[b] - 1}]; c (*Artur Jasinski*)

Formula

a(n) = A138793(n+1)-A138793(n)

A138963 a(1) = 1, a(n) = the largest prime divisor of A138793(n).

Original entry on oeis.org

1, 7, 107, 149, 953, 218107, 402859, 4877, 379721, 4349353, 169373, 182473, 1940144339383, 2184641, 437064932281, 5136696159619, 67580875919190833, 1156764458711, 464994193118899, 4617931439293, 1277512103328491957510030561, 8177269604099
Offset: 1

Views

Author

Artur Jasinski, Apr 04 2008

Keywords

Comments

For the smallest prime divisors of A138793 see A138962.

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[AppendTo[a, w[[k]]], {k, 1, Length[w]}]; p = FromDigits[Reverse[a]]; AppendTo[b, First[Last[FactorInteger[p]]]], {n, 1, 31}]; b (* Artur Jasinski, Apr 04 2008 *)
    lst = {}; Table[First[Last[FactorInteger[FromDigits[Reverse[lst = Join[lst,IntegerDigits[n]]]]]]], {n, 1, 10}] (* Robert Price, Mar 22 2015 *)
  • PARI
    f(n) = my(D = Vec(concat(apply(s->Str(s), [1..n])))); eval(concat(vector(#D, k, D[#D-k+1]))); \\ A138793
    a(n) = if(n == 1, 1, vecmax(factor(f(n))[,1])); \\ Daniel Suteu, May 26 2022

Formula

a(n) = A006530(A138793(n)). - Daniel Suteu, May 26 2022

A226195 Numbers n = x0 x1 x2...x9 such that xi is the number of digits greater than i in n.

Original entry on oeis.org

1, 10, 21, 22, 100, 210, 220, 311, 321, 332, 333, 1000, 2100, 2200, 3110, 3210, 3320, 3330, 4111, 4211, 4321, 4331, 4422, 4432, 4443, 4444, 10000, 21000, 22000, 31100, 32100, 33200, 33300, 41110, 42110, 43210, 43310, 44220, 44320, 44430, 44440, 51111, 52111
Offset: 1

Views

Author

Michel Lagneau, May 30 2013

Keywords

Comments

This sequence contains 1142 terms.
Extension of the autobiographical numbers (or curious numbers) (A046043).
The concatenated numbers from n down to 1 (A000422(1) - A000422(9)): 1, 21, 321, ..., 987654321 are in the sequence.
The sequence includes A000461(n) (the n-digit number consisting of all n's) for n=1..9, i.e., 1, 22, 333, 4444, ..., 999999999.
The powers of 10 (A011557(0)..A011557(9)) are in the sequence.
The numbers of the form a(n)*10^p are also in the sequence.

Examples

			x0 x1 x2 x3 = 4211 is in the sequence because, for i = 0, 1, 2, 3:
xi > 0 (4 times) => x0 = 4;
xi > 1 (2 times) => x1 = 2;
xi > 2 (1 time) => x2 = 1;
xi > 3 (1 time) => x3 = 1.
		

Crossrefs

Programs

  • Maple
    T:=array(1..10):for n from 1 to 100000 do:nn:=length(n):for a from 1 to nn do:T[a] :=0:od:x:=convert(n,base,10): for k from 1 to nn do:for i from 1 to nn do: if k-1
    				
Previous Showing 51-60 of 72 results. Next