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 11 results. Next

A127422 Duplicate of A001703.

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, 373839, 383940, 394041
Offset: 0

Views

Author

Keywords

A074991 Concatenation of n, n+1, n+2 divided by 3.

Original entry on oeis.org

4, 41, 78, 115, 152, 189, 226, 263, 2970, 30337, 33704, 37071, 40438, 43805, 47172, 50539, 53906, 57273, 60640, 64007, 67374, 70741, 74108, 77475, 80842, 84209, 87576, 90943, 94310, 97677, 101044, 104411, 107778, 111145, 114512
Offset: 0

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Comments

If all the three numbers have the same number of digits then the terms are in A.P. with a common difference that follows a pattern with increase in number of digits. E.g. for n = 1 to 7 the common difference, c.d. = 37. For n = 10 to 97 c.d. = 3367, For three digit numbers from 100 to 997 it is 333667 etc.

Examples

			a(4) = 456/3 = 152.
		

Crossrefs

Cf. A074992.
Equals (1/3) A001703.

Programs

  • Maple
    read("transforms") ;
    A074991 := proc(n)
            digcatL([n,n+1,n+2]) ;
            %/3 ;
    end proc:
    seq(A074991(n),n=0..50) ; # R. J. Mathar, Oct 04 2011
  • Mathematica
    f[n_] := FromDigits@ Flatten@ IntegerDigits[{n, n + 1, n + 2}]/3; Array[f, 26, 0] (* Robert G. Wilson v *)

Extensions

Incorrect conjecture deleted by Colin Barker, Sep 26 2013

A035333 Concatenation of two or more consecutive positive integers.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 123, 234, 345, 456, 567, 678, 789, 910, 1011, 1112, 1213, 1234, 1314, 1415, 1516, 1617, 1718, 1819, 1920, 2021, 2122, 2223, 2324, 2345, 2425, 2526, 2627, 2728, 2829, 2930, 3031, 3132, 3233, 3334, 3435, 3456, 3536, 3637, 3738
Offset: 1

Views

Author

Keywords

Crossrefs

For concatenations of exactly k consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).
See also A007908 for concatenation of 1 through n.
For primes see A052087.
All of A007908, A052087, A053067, A279610 are subsequences.

Programs

  • Python
    import heapq
    from itertools import islice
    def agen():
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield v
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 47))) # Michael S. Branicky, Dec 23 2021

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
Corrected by Paul Tek, Jun 08 2013

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

A279204 Numbers whose decimal expansion is a concatenation of 4 consecutive increasing nonnegative numbers.

Original entry on oeis.org

1234, 2345, 3456, 4567, 5678, 6789, 78910, 891011, 9101112, 10111213, 11121314, 12131415, 13141516, 14151617, 15161718, 16171819, 17181920, 18192021, 19202122, 20212223, 21222324, 22232425, 23242526, 24252627, 25262728, 26272829, 27282930, 28293031, 29303132, 30313233, 31323334
Offset: 1

Views

Author

N. J. A. Sloane, Dec 17 2016

Keywords

Comments

Primes in this sequence are A030471. Are there infinitely many primes in the sequence? - Chai Wah Wu, Dec 17 2016

Crossrefs

Cf. A030471 (primes).
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

  • Mathematica
    A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
    Array[A279204, 50] (* Paolo Xausa, Aug 26 2024 *)
  • Python
    def A279204(n):
        return int(str(n)+str(n+1)+str(n+2)+str(n+3)) # Chai Wah Wu, Dec 17 2016

A030471 Primes which are concatenations of four consecutive numbers.

Original entry on oeis.org

4567, 14151617, 20212223, 34353637, 58596061, 64656667, 118119120121, 140141142143, 148149150151, 176177178179, 196197198199, 218219220221, 220221222223, 236237238239, 238239240241, 268269270271, 278279280281
Offset: 1

Views

Author

Keywords

Comments

There are no primes which are concatenations of three consecutive numbers (A001703), in fact all such concatenations are divisible by 3. - Zak Seidov, Oct 25 2014

Crossrefs

Programs

  • Mathematica
    A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
    Select[Array[A279204, 500], PrimeQ] (* Paolo Xausa, Aug 26 2024 *)
  • PARI
    lista(nn) = for(n=1, nn, if (isprime(q=eval(concat(concat(concat(Str(n), Str(n+1)), Str(n+2)), Str(n+3)))), print1(q, ", "))); \\ Michel Marcus, Oct 26 2014
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        strs = ["1", "2", "3", "4"]
        for k in count(1):
            if isprime(t:=int("".join(strs))): yield t
            strs = strs[1:] + [str(k+4)]
    print(list(islice(agen(), 20))) # Michael S. Branicky, Aug 26 2024

Extensions

Edited by Charles R Greathouse IV, Apr 23 2010

A287747 Concatenation {n, n + 1,.., n + 9}.

Original entry on oeis.org

12345678910, 234567891011, 3456789101112, 45678910111213, 567891011121314, 6789101112131415, 78910111213141516, 891011121314151617, 9101112131415161718, 10111213141516171819, 11121314151617181920, 12131415161718192021, 13141516171819202122, 14151617181920212223
Offset: 1

Views

Author

XU Pingya, Jun 01 2017

Keywords

Comments

For the position of primes in this sequence, see A287244.

Crossrefs

Programs

  • Mathematica
    A287747[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 9]]]];
    Array[A287747, 25] (* Paolo Xausa, Aug 26 2024 *)

A306643 Numbers that, for some x, are the concatenation of x, x+1 and x+2 and are divisible by at least two of x, x+1 and x+2.

Original entry on oeis.org

123, 234, 345, 456, 8910, 101112, 230231232
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 03 2019

Keywords

Comments

012 is not included because leading 0's are not allowed.
From Charlie Neder, Jun 05 2019: (Start)
If x = 10^k - 2, then x|x+1|x+2 (with | denoting concatenation) will be congruent to 22 modulo x, -9 modulo x+1, and 0 modulo x+2.
If x = 10^k - 1, then x|x+1|x+2 will be congruent to 12 modulo x and 1 modulo x+1.
Therefore, the only term such that x and x+2 have different lengths is 8910.
By reducing modulo x + {0,1,2} it can be shown that if at least two of x|10^k+2, x+1|10^2k-1, and x+2|2*10^2k-10^k are true - presuming x and x+2 are the same length - then x|x+1|x+2 is in this sequence. No further terms corresponding to x < 10^18. (End)
No further terms corresponding to x < 10^50. - Chai Wah Wu, Jun 19 2019

Examples

			230231232 is the concatenation of 230, 231 and 232 and is divisible by 231 and 232.
		

Crossrefs

Subsequence of A001703.
Cf. A308527.

Programs

  • Maple
    cat3:= proc(x)
      local t;
      t:= 10^length(x+2);
      x*(1 + t*(1+10^length(x+1)))+t+2
    end proc:
    f:= proc(x) local q,a,b;
      q:= cat3(x);
      a:= (q/x)::integer;
      b:= (q/(x+1))::integer;
      if a and b then return q elif not(a) and not(b) then return NULL fi;
      if (q/(x+2))::integer then q else NULL fi
    end proc:
    map(f, [$1..1000]);
  • Python
    for k in range(1,8):
      for x in range(10**(k-1),10**k-2): # will not find 8910
        if sum([not (10**k+2)%x,not (10**(2*k)-1)%(x+1),\
        not (2*10**(2*k)+10**k)%(x+2)]) >= 2:
          print(str(x)+str(x+1)+str(x+2)) # Charlie Neder, Jun 05 2019

A375481 Starting numbers for the terms in A035333.

Original entry on oeis.org

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

Views

Author

Nicholas M. R. Frieler, Aug 17 2024

Keywords

Examples

			a(19) = 12 since A035333(19) = 1213, the concatenation of 12 and 13.
a(20) =  1 since A035333(20) = 1234, the concatenation of 1, 2, 3 and 4.
		

Crossrefs

For the terms generated by consecutive concatenations see A035333.For concatenations of various numbers of consecutive integers see A000027 (k=1), A127421 (k=2), A001703 (k=3), A279204 (k=4).For primes that are the concatenation of two or more consecutive integers see A052087.

Programs

  • Mathematica
    ConsecutiveNumber[num_, numberOfNumbers_] := Module[{},
      If[numberOfNumbers == 1, Return[num]];
      FromDigits@(IntegerDigits[num]~Join~
         IntegerDigits@ConsecutiveNumber[num + 1, numberOfNumbers - 1])
     ]
    ConsecutiveNumberDigits[maxDigits_] := Module[{numList = {}, c, d},
      Do[
       numList =
         numList~Join~(Association[# -> ConsecutiveNumber[#, c]] & /@
            Range[Power[10, d - 1], Power[10, d] - 1]);,
       {d, 1, Floor[maxDigits/2]}, {c, 2, Floor[maxDigits/d]}
       ];
      SortBy[Select[numList, Values[#][[1]] < Power[10, maxDigits] &],
       Values[#] &]
     ]
    Keys[ConsecutiveNumberDigits[8]]//Flatten (* number in this line corresponds to the maximum number of digits of the concatenated terms *)
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms
        c = 12
        h = [(c, 1, 2)]
        nextcount = 3
        while True:
            (v, s, l) = heapq.heappop(h)
            yield s
            if v >= c:
                c = int(str(c) + str(nextcount))
                heapq.heappush(h, (c, 1, nextcount))
                nextcount += 1
            l += 1; v = int(str(v)[len(str(s)):] + str(l)); s += 1
            heapq.heappush(h, (v, s, l))
    print(list(islice(agen(), 70))) # Michael S. Branicky, Aug 18 2024

A226041 Primes generated by concatenation of three consecutive numbers divided by three.

Original entry on oeis.org

41, 263, 50539, 64007, 151549, 191953, 205421, 232357, 252559, 266027, 272761, 306431, 326633, 35035369, 39039373, 52386053, 62396063, 70404071, 77077411, 82416083, 96430097, 103103437, 106440107, 110444111
Offset: 1

Views

Author

Jayanta Basu, May 24 2013

Keywords

Examples

			41 is in the list since concatenation of 1, 2 and 3 gives 123/3 = 41. Similarly concatenation of 15, 16 and 17 gives 151617 and 151617/3 = 50539, a prime.
		

Crossrefs

Cf. A001703.

Programs

  • Mathematica
    Select[Table[FromDigits[Flatten[IntegerDigits[n + Range[-1, 1]]]]/3, {n, 350}], PrimeQ]
Showing 1-10 of 11 results. Next