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-9 of 9 results.

A001703 Decimal concatenation of n, n+1, and n+2.

Original entry on oeis.org

12, 123, 234, 345, 456, 567, 678, 789, 8910, 91011, 101112, 111213, 121314, 131415, 141516, 151617, 161718, 171819, 181920, 192021, 202122, 212223, 222324, 232425, 242526, 252627, 262728, 272829, 282930, 293031, 303132, 313233, 323334, 333435, 343536, 353637, 363738
Offset: 0

Views

Author

mag(AT)laurel.salles.entpe.fr

Keywords

Comments

All terms are divisible by 3. Every third term starting with a(2) is divisible by 9. - Alonso del Arte, May 27 2013

Examples

			a(8) = 8910 since the three consecutive numbers starting with 8 are 8, 9, 10, and these concatenate to 8910. (This is the first term that differs from A193431).
		

Crossrefs

Cf. A074991.
For concatenations of exactly k consecutive integers see A000027 (k=1), A127421 (k=2), A279204 (k=4). For 2 or more see A035333.
See also A127422, A127423, A127424.

Programs

  • Maple
    read(transforms) :
    A001703 := proc(n)
        digcatL([n,n+1,n+2]) ;
    end proc:
    seq(A001703(n),n=1..20) ; # R. J. Mathar, Mar 29 2017
    # Third Maple program:
    a:= n-> parse(cat(n, n+1, n+2)):
    seq(a(n), n=0..50); # Alois P. Heinz, Mar 29 2017
  • Mathematica
    concat3Nums[n_] := FromDigits@ Flatten@ IntegerDigits[{n, n + 1, n + 2}]; Array[concat3Nums, 25] (* Robert G. Wilson v *)
  • PARI
    a(n)=eval(Str(n,n+1,n+2)) \\ Charles R Greathouse IV, Oct 08 2011
    
  • Python
    for n in range(100): print(int(str(n)+str(n+1)+str(n+2))) # David F. Marrs, Sep 18 2018

Formula

The portion of the sequence with all three numbers having d digits - i.e., n in 10^(d-1)..10^d-3 - is in arithmetic sequence: a(n) = (10^(2*d)+10^d+1)*n + (10^d+2). - Franklin T. Adams-Watters, Oct 07 2011

Extensions

Initial term 12 added and offset changed to 0 at the suggestion of R. J. Mathar. - N. J. A. Sloane, Mar 29 2017

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

A054211 Numbers k such that k concatenated with k-1 is prime.

Original entry on oeis.org

4, 10, 22, 24, 34, 42, 58, 70, 78, 88, 100, 102, 108, 112, 114, 124, 148, 154, 160, 172, 180, 192, 198, 202, 208, 210, 214, 238, 244, 262, 264, 268, 270, 282, 294, 300, 304, 312, 328, 330, 334, 340, 342, 354, 372, 384, 390, 394, 412, 414, 420, 424, 444, 454
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Comments

A010051(A127423(a(n))) = 1. - Reinhard Zumkeller, Jun 27 2015
All terms are even. - Michel Marcus, Oct 14 2016

Crossrefs

Programs

  • Haskell
    a054211 n = a054211_list !! (n-1)
    a054211_list = filter ((== 1) . a010051' . a127423) [1..]
    -- Reinhard Zumkeller, Jun 27 2015 Jul 15 2012
    
  • Mathematica
    ncpQ[{a_,b_}]:=PrimeQ[FromDigits[Flatten[IntegerDigits[{b,a}]]]]; Transpose[ Select[Partition[Range[500],2,1],ncpQ]][[2]] (* Harvey P. Dale, Nov 25 2012 *)
    Select[Range[500],PrimeQ[#*10^IntegerLength[#-1]+#-1]&] (* Harvey P. Dale, Mar 16 2019 *)
  • PARI
    isok(n) = isprime(eval(Str(n, n-1))); \\ Michel Marcus, Oct 14 2016

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 *)

A215028 a(1) = 1; for n >= 1, a(n+1) = (concatenation of n+1 and n) - a(n).

Original entry on oeis.org

1, 20, 12, 31, 23, 42, 34, 53, 45, 64, 1046, 165, 1147, 266, 1248, 367, 1349, 468, 1450, 569, 1551, 670, 1652, 771, 1753, 872, 1854, 973, 1955, 1074, 2056, 1175, 2157, 1276, 2258, 1377, 2359, 1478, 2460, 1579, 2561, 1680, 2662, 1781, 2763, 1882, 2864, 1983
Offset: 1

Views

Author

N. J. A. Sloane, Aug 04 2012

Keywords

Comments

A variation of A215027.

Crossrefs

Programs

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

A256285 a(n) = smallest divisor of the concatenation of n+1 and n, that did not occur earlier.

Original entry on oeis.org

1, 2, 43, 3, 5, 4, 29, 7, 109, 6, 173, 8, 9, 757, 17, 11, 23, 14, 673, 10, 2221, 18, 2423, 631, 15, 47, 257, 12, 13, 313, 359, 28, 3433, 19, 727, 467, 1279, 22, 577, 20, 4241, 26, 1481, 16, 929, 21, 37, 1237, 27, 25, 59, 24, 41, 2777, 39, 1439, 5857, 331, 73
Offset: 1

Views

Author

Keywords

Comments

Is this a permutation of the integers > 0 ?
From Robert Israel, May 20 2024: (Start)
Yes, this is a permutation of the positive integers.
For any positive integer k, there are arbitrarily large d such that 10^(d-1) > k and GCD(10^d + 1, k) == 1. For such d, there is n such that n == -10^d (10^d + 1)^(-1) (mod k) and 10^d > n >= 10^(d-1), and this implies that the concatenation of n+1 and n, which is 10^d * (n+1) + n, is divisible by k. After all numbers < k have occurred, the next such n must have a(n) = k. (End)

Crossrefs

Programs

  • Haskell
    import Data.List (insert); import Data.List.Ordered (minus)
    a256285 n = a256285_list !! (n-1)
    a256285_list = f (tail a127423_list) [] where
       f (x:xs) ds = y : f xs (insert y ds) where
                     y = head (a027750_row x `minus` ds)
  • Maple
    R:= NULL: S:= {}:
    for n from 1 to 100 do
      v:=  10^(1+ilog10(n))*(n+1)+n;
      s:= min(numtheory:-divisors(v) minus S);
      R:= R,s;
      S:= S union {s};
    od:
    R; # Robert Israel, May 20 2024

A277351 Value of (n+1,n) concatenated in binary representation.

Original entry on oeis.org

5, 14, 19, 44, 53, 62, 71, 152, 169, 186, 203, 220, 237, 254, 271, 560, 593, 626, 659, 692, 725, 758, 791, 824, 857, 890, 923, 956, 989, 1022, 1055, 2144, 2209, 2274, 2339, 2404, 2469, 2534, 2599, 2664, 2729, 2794, 2859, 2924, 2989, 3054, 3119, 3184, 3249, 3314
Offset: 1

Views

Author

Paolo P. Lava, Oct 10 2016

Keywords

Examples

			Binary representation of 12 and 13 are 1100 and 1101. Then, concat(1101,1100) = 11011100 converted in decimal representation is 220.
		

Crossrefs

Programs

  • Maple
    f:= n -> (n+1)*2^(1+ilog2(n))+n:
    map(f, [$1..100]); # Robert Israel, Oct 14 2016
  • Mathematica
    Table[FromDigits[Join @@ Map[IntegerDigits[#, 2] &, {n + 1, n}], 2], {n, 50}] (* Michael De Vlieger, Oct 14 2016 *)
  • PARI
    a(n) = subst(Pol(concat(binary(n+1), binary(n))), x, 2); \\ Michel Marcus, Oct 10 2016
    
  • PARI
    a(n) = (n+1)*2^(1+logint(n,2)) + n; \\ after Maple; Michel Marcus, Oct 15 2016
    
  • Python
    def a(n): return int(bin(n+1)[2:] + bin(n)[2:], 2)
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, May 14 2021

Formula

a(n) = (n+1) * 2^A070939(n) + n.
G.f.: (1-x)^(-2)*(5*x - 2*x^2 + Sum_{m>=1} ((2^(2*m)+2^m)*x^(2^m) - 2^(2*m)*x^(2^m+1))). - Robert Israel, Oct 14 2016

A317947 Concatenate n and n-1 in binary.

Original entry on oeis.org

10, 101, 1110, 10011, 101100, 110101, 111110, 1000111, 10011000, 10101001, 10111010, 11001011, 11011100, 11101101, 11111110, 100001111, 1000110000, 1001010001, 1001110010, 1010010011, 1010110100, 1011010101, 1011110110, 1100010111, 1100111000, 1101011001, 1101111010, 1110011011, 1110111100
Offset: 1

Views

Author

N. J. A. Sloane, Aug 11 2018

Keywords

Crossrefs

Cf. A000523, A007088, A127423 (base 10 version).

Programs

  • Maple
    f:= proc(n) local A;
      A:= convert(n-1,binary);
      10^length(A)*convert(n,binary)+A
    end proc:
    f(1):= 10:
    map(f, [$1..100]); # Robert Israel, Aug 12 2018
  • PARI
    zbinary(n) = if (n, binary(n), [0]);
    a(n) = fromdigits(concat(zbinary(n), zbinary(n-1))); \\ Michel Marcus, Aug 12 2018

Formula

a(n) = A007088(n-1)+10^(1+A000523(n-1))*A007088(n) for n >= 2. - Robert Israel, Aug 12 2018

Extensions

More terms from Robert Israel, Aug 12 2018

A376252 Concatenated (n+1)||n modulo n.

Original entry on oeis.org

0, 0, 1, 2, 0, 4, 3, 2, 1, 0, 1, 4, 9, 2, 10, 4, 15, 10, 5, 0, 16, 12, 8, 4, 0, 22, 19, 16, 13, 10, 7, 4, 1, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20
Offset: 1

Views

Author

Stuart Coe, Sep 17 2024

Keywords

Comments

There is an interesting and striking pattern in the graph of this sequence that appears at n >= 20 and appears to continue indefinitely.
There does not appear to be a corresponding pattern for other bases.
Beyond the first two terms, zeros only appear where n is a multiple of 5.

Examples

			For n=2: 32 mod 2 is 0.
For n=123: 124123 mod 123 is 16.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Mod[FromDigits[Join[IntegerDigits[n+1],IntegerDigits[n]]],n]; Array[a,80] (* Stefano Spezia, Sep 18 2024 *)
  • PARI
    a(n) = eval(concat(Str(n+1), Str(n))) % n; \\ Michel Marcus, Sep 17 2024
    
  • PARI
    a(n) = 10*10^logint(n, 10) % n; \\ Ruud H.G. van Tol, Oct 26 2024
    
  • Python
    def a(n): return int(str(n+1)+str(n))%n
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Sep 17 2024
    
  • Python
    def A376252(n): return int('1'+str(n))%n # Chai Wah Wu, Oct 01 2024

Formula

a(n) = 10^A055642(n) mod n. Concatenation of 1||n modulo n. - Chai Wah Wu, Oct 01 2024
Showing 1-9 of 9 results.