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-10 of 31 results. Next

A127421 Numbers whose decimal expansion is a concatenation of 2 consecutive increasing nonnegative numbers.

Original entry on oeis.org

1, 12, 23, 34, 45, 56, 67, 78, 89, 910, 1011, 1112, 1213, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3536, 3637, 3738, 3839, 3940, 4041, 4142, 4243, 4344, 4445, 4546
Offset: 1

Views

Author

Artur Jasinski, Jan 14 2007

Keywords

Comments

Primes in the sequence are in A030458. - Bruno Berselli, Mar 25 2015
a(n) always has an even number of digits unless n is in A103456. - Alonso del Arte, Oct 30 2019

Examples

			a(1) = "0,1" = 1.
a(13) = "12,13" = 1213.
		

Crossrefs

A variant of A001704.
For concatenations of exactly k consecutive integers see A000027 (k = 1), A127421 (k = 2), A001703 (k = 3), A279204 (k = 4). For 2 or more see A035333.

Programs

  • Magma
    [Seqint(Intseq(n+1) cat Intseq(n)): n in [0..50]]; // Bruno Berselli, Mar 25 2015
    
  • Maple
    a:= n-> parse(cat(n-1, n)):
    seq(a(n), n=1..55);  # Alois P. Heinz, Jul 05 2018
  • Mathematica
    nMax = 49; digitsList = IntegerDigits[Range[0, nMax]]; Table[FromDigits[Flatten[{digitsList[[n]], digitsList[[n + 1]]}]], {n, nMax - 1}] (* Alonso del Arte, Oct 24 2019 *)
    Table[FromDigits[Flatten[IntegerDigits/@{n,n+1}]],{n,0,50}] (* Harvey P. Dale, May 16 2020 *)
  • Python
    for n in range(100): print(int(str(n)+str(n+1))) # David F. Marrs, Sep 17 2018
    
  • Scala
    val numerStrs = (0 to 49).map(Integer.toString(_)).toList
    val concats = (numerStrs.dropRight(1)) zip (numerStrs.drop(1))
    concats.map(x => Integer.parseInt(x.1 + x._2)) // _Alonso del Arte, Oct 24 2019

Extensions

More terms from Joshua Zucker, May 15 2007

A127423 a(1) = 1; for n > 1, a(n) = n concatenated with n - 1.

Original entry on oeis.org

1, 21, 32, 43, 54, 65, 76, 87, 98, 109, 1110, 1211, 1312, 1413, 1514, 1615, 1716, 1817, 1918, 2019, 2120, 2221, 2322, 2423, 2524, 2625, 2726, 2827, 2928, 3029, 3130, 3231, 3332, 3433, 3534, 3635, 3736, 3837, 3938, 4039, 4140, 4241, 4342, 4443, 4544, 4645
Offset: 1

Views

Author

Artur Jasinski, Jan 14 2007

Keywords

Comments

a(1) could also have been defined to be 10. In that case the initial terms would be 10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 1110, 1211, 1312, 1413, 1514, 1615, 1716, 1817, 1918, 2019, 2120, 2221, 2322, 2423, 2524, 2625, 2726, 2827, 2928, 3029, 3130, 3231, 3332, 3433, ... (Comment added in case someone is searching for that sequence.) - N. J. A. Sloane, Aug 11 2018
A010051(a(A054211(n))) = 1. - Reinhard Zumkeller, Jun 27 2015

Examples

			a(12) = 1211 because 12 and 11 are two consecutive decreasing numbers.
		

Crossrefs

Programs

  • Haskell
    a127423 n = a127423_list !! (n-1)
    a127423_list = 1 : map read (zipWith (++) (tail iss) iss) :: [Integer]
                       where iss = map show [1..]
    -- Reinhard Zumkeller, Oct 07 2014
    
  • Magma
    [Seqint(Intseq(n) cat Intseq(n+1)): n in [0..50]]; // Vincenzo Librandi, Nov 08 2016
    
  • Maple
    c2:=proc(x,y) local s: s:=proc(m) nops(convert(m,base,10)) end: x*10^s(y)+y: end: seq(c2(n,n-1),n=1..53); # Emeric Deutsch, Mar 07 2007
  • Mathematica
    Join[{1}, nxt[n_] := Module[{idn = IntegerDigits[n + 1], idn1 = IntegerDigits[n]}, FromDigits[Join[idn, idn1]]]; Array[nxt, 70]] (* Vincenzo Librandi, Nov 08 2016 *)
    nxt[{n_, a_}] := {n + 1, (n + 1) * 10^IntegerLength[n] + n}; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, Jan 04 2019 *)
  • PARI
    a(n) = if (n==1, 1, eval(Str(n, n-1))); \\ Michel Marcus, Oct 14 2016
    
  • Scala
    val numerStrs = (1 to 50).map(Integer.toString(_)).toList
    val concats = (numerStrs.drop(1)) zip (numerStrs.dropRight(1))
    concats.map(x => Integer.parseInt(x.1 + x._2)) // _Alonso del Arte, Oct 24 2019

Extensions

More terms from Emeric Deutsch, Mar 07 2007

A074993 a(n) = floor((concatenation of n, n+1)/2).

Original entry on oeis.org

0, 6, 11, 17, 22, 28, 33, 39, 44, 455, 505, 556, 606, 657, 707, 758, 808, 859, 909, 960, 1010, 1061, 1111, 1162, 1212, 1263, 1313, 1364, 1414, 1465, 1515, 1566, 1616, 1667, 1717, 1768, 1818, 1869, 1919, 1970, 2020, 2071, 2121, 2172, 2222, 2273, 2323, 2374
Offset: 0

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Comments

The first differences follow a pattern. Odd-indexed terms and even-indexed terms form separate A.P.s with the same common difference for all n except n = 10^k -1. The corresponding common differences are the repunits = (10^(d+1)-1)/9 where d = the number of digits in n.

Crossrefs

Programs

  • Mathematica
    cc[n_]:=Floor[FromDigits[Join[IntegerDigits[n],IntegerDigits[n+1]]]/2]; Array[cc,40,0] (* Harvey P. Dale, Nov 11 2011 *)

A030457 Numbers k such that k concatenated with k+1 is prime.

Original entry on oeis.org

2, 6, 8, 12, 36, 42, 50, 56, 62, 68, 78, 80, 90, 92, 96, 102, 108, 120, 126, 138, 150, 156, 180, 186, 188, 192, 200, 216, 242, 246, 252, 270, 276, 278, 300, 308, 312, 318, 330, 338, 342, 350, 362, 368, 378, 390, 402, 410, 416, 420, 426, 428, 432
Offset: 1

Views

Author

Keywords

Comments

k is not congruent to 1 (mod 2), 1 (mod 3), or 4 (mod 5). - Charles R Greathouse IV, Apr 16 2012

Examples

			1213 is prime, therefore 12 is a term.
		

Crossrefs

Cf. A010051, A001704, A068700 (subsequence).
Numbers k such that k concatenated with k+m is prime: this sequence (m=1), A032617 (m=2), A032618 (m=3), A032619 (m=4), A032620 (m=5), A032621 (m=6), A032622 (m=7), A032623 (m=8), A032624 (m=9).

Programs

  • Haskell
    a030457 n = a030457_list !! (n-1)
    a030457_list = filter ((== 1) . a010051' . a001704) [1..]
    -- Reinhard Zumkeller, Jun 27 2015, Apr 26 2011
    
  • Magma
    [n: n in [1..500] | IsPrime(Seqint(Intseq(n+1) cat Intseq(n)))]; // Vincenzo Librandi, Jul 23 2016
    
  • Maple
    concat:=proc(a,b) local bb: bb:=nops(convert(b,base,10)): 10^bb*a+b end proc: a:=proc(n) if isprime(concat(n,n+1))=true then n else end if end proc: seq(a(n),n=0..500); # Emeric Deutsch, Nov 23 2007
  • Mathematica
    Select[ Range[500], PrimeQ[ ToExpression[ StringJoin[ ToString[#], ToString[#+1]]]]&] (* Jean-François Alcover, Nov 18 2011 *)
    Select[Range[500],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ #+1]]]]&] (* Harvey P. Dale, Dec 23 2015 *)
    Position[#[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Partition[Range[ 500], 2,1],?PrimeQ]//Flatten (* _Harvey P. Dale, Jul 14 2019 *)
  • PARI
    for(n=1,10^5,if(isprime(eval(concat(Str(n),n+1))),print1(n,", "))); /* Joerg Arndt, Apr 27 2011 */
    
  • Python
    from sympy import isprime
    def ok(n): return isprime(int(str(n)+str(n+1)))
    print([k for k in range(500) if ok(k)]) # Michael S. Branicky, Apr 19 2023

A136414 Put the natural numbers together without spaces and read them two at a time advancing one space each time.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 91, 10, 1, 11, 11, 12, 21, 13, 31, 14, 41, 15, 51, 16, 61, 17, 71, 18, 81, 19, 92, 20, 2, 21, 12, 22, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 93, 30, 3, 31, 13, 32, 23, 33, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 94, 40, 4, 41, 14
Offset: 1

Views

Author

Ben Paul Thurston, Mar 31 2008

Keywords

Comments

a(n) = A162711(n,2) for n>1. - Reinhard Zumkeller, Jul 11 2009

Examples

			34 is the third entry because the natural numbers written together look like 1234567891011 and reading them off two at a time produces 12, 23, 34, ...
		

Crossrefs

Programs

  • Haskell
    a136414 n = a136414_list !! (n-1)
    a136414_list = zipWith (+) (tail a007376_list) $ map (10 *) a007376_list
    -- Reinhard Zumkeller, Jul 28 2011

Formula

a(n) = 10*A007376(n) + A007376(n+1). - Reinhard Zumkeller, Jul 11 2009

Extensions

More terms from Reinhard Zumkeller, Jul 11 2009

A248378 a(2n) = concatenation of n+1 with n+2, a(2n+1) = concatenation of n+2 with n+1.

Original entry on oeis.org

12, 21, 23, 32, 34, 43, 45, 54, 56, 65, 67, 76, 78, 87, 89, 98, 910, 109, 1011, 1110, 1112, 1211, 1213, 1312, 1314, 1413, 1415, 1514, 1516, 1615, 1617, 1716, 1718, 1817, 1819, 1918, 1920, 2019, 2021, 2120, 2122, 2221, 2223, 2322, 2324, 2423, 2425, 2524, 2526
Offset: 0

Views

Author

N. J. A. Sloane, Oct 07 2014

Keywords

References

  • Charles Duvall, Email to N. J. A. Sloane, Oct 07 2014.

Crossrefs

Cf. A154530 (primes).

Programs

  • Haskell
    import Data.List (transpose)
    a248378 n = a248378_list !! n
    a248378_list = concat $ transpose [a001704_list, tail a127423_list]
    -- Reinhard Zumkeller, Oct 07 2014
  • Mathematica
    Table[{FromDigits[Join[IntegerDigits[n],IntegerDigits[n+1]]],FromDigits[Join[IntegerDigits[n+1],IntegerDigits[ n]]]},{n,30}]//Flatten (* Harvey P. Dale, Apr 19 2024 *)

A116283 k times k+7 gives the concatenation of two numbers m and m-1.

Original entry on oeis.org

7, 30, 64, 42753, 57241, 75423, 425072, 574922, 979528, 4301393, 5698601, 7028666, 4925000747, 5074999247, 7748266574, 8511881484, 8814851184, 7059602159672, 7106167933828, 7439286611621, 7485852385777
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Crossrefs

Programs

  • Python
    def ok(n):
        s = str(n*(n+7)); h = (len(s)+1)//2; return int(s[:h])-1 == int(s[h:])
    print(list(filter(ok, range(2, 10**6)))) # Michael S. Branicky, Jul 30 2021

A215027 a(n+1) = (concatenation of n and n+1) - a(n), a(0) = 0.

Original entry on oeis.org

0, 1, 11, 12, 22, 23, 33, 34, 44, 45, 865, 146, 966, 247, 1067, 348, 1168, 449, 1269, 550, 1370, 651, 1471, 752, 1572, 853, 1673, 954, 1774, 1055, 1875, 1156, 1976, 1257, 2077, 1358, 2178, 1459, 2279, 1560, 2380, 1661, 2481, 1762, 2582, 1863, 2683, 1964, 2784, 2065, 2885, 2166, 2986, 2267, 3087, 2368, 3188, 2469, 3289, 2570, 3390, 2671, 3491, 2772, 3592, 2873, 3693
Offset: 0

Views

Author

N. J. A. Sloane, Aug 04 2012, based on a posting to the Sequence Fans Mailing List by Eric Angelini

Keywords

Comments

Eric Angelini defined this by saying that "a(n)+a(n+1) = concatenation of n and (n+1)".
An easy induction argument shows that a(n) is always positive.

Examples

			a(100) = concat(99,100) - a(99) = 99 100 - 4590 = 94510.
		

Crossrefs

Programs

  • Maple
    f:=proc(i) i*10^(1+floor(evalf(log10(i+1), 10)))+i+1; end: # A001704
    a:=proc(n) option remember; global f; if n=1 then 1 else f(n-1)-a(n-1); fi; end;
  • PARI
    A215027(n,print_all=0)={my(a=print_all & print1(0));for(n=1,n,a=(n-1)*10^#Str(n)+n-a;print_all & print1(","a));a} \\ - M. F. Hasler, Aug 23 2012

Formula

The o.g.f. x*(1+10*x+810*x^9-720*x^10)/(1+x)/(1-x)^2 yields correct terms up to a(99), but not beyond. - M. F. Hasler, Aug 23 2012

Extensions

Initial term a(0)=0 added by M. F. Hasler, Aug 23 2012

A032610 Concatenation of n and n + 5 or {n,n+5}.

Original entry on oeis.org

16, 27, 38, 49, 510, 611, 712, 813, 914, 1015, 1116, 1217, 1318, 1419, 1520, 1621, 1722, 1823, 1924, 2025, 2126, 2227, 2328, 2429, 2530, 2631, 2732, 2833, 2934, 3035, 3136, 3237, 3338, 3439, 3540, 3641, 3742, 3843, 3944, 4045, 4146, 4247
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

A032612 Concatenation of n and n+7.

Original entry on oeis.org

18, 29, 310, 411, 512, 613, 714, 815, 916, 1017, 1118, 1219, 1320, 1421, 1522, 1623, 1724, 1825, 1926, 2027, 2128, 2229, 2330, 2431, 2532, 2633, 2734, 2835, 2936, 3037, 3138, 3239, 3340, 3441, 3542, 3643, 3744, 3845, 3946, 4047, 4148, 4249
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n*10^IntegerLength[n+7]+n+7,{n,50}] (* Harvey P. Dale, Apr 26 2025 *)
  • Python
    def A032612(n): return n*(10**len(str(n+7))+1)+7 # Chai Wah Wu, Jun 29 2025
Showing 1-10 of 31 results. Next