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

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

A053067 a(n) is the concatenation of next n numbers (omit leading 0's).

Original entry on oeis.org

1, 23, 456, 78910, 1112131415, 161718192021, 22232425262728, 2930313233343536, 373839404142434445, 46474849505152535455, 5657585960616263646566, 676869707172737475767778, 79808182838485868788899091, 9293949596979899100101102103104105, 106107108109110111112113114115116117118119120
Offset: 1

Views

Author

Felice Russo, Feb 25 2000

Keywords

Comments

Concatenation of the integers from A000124(n-1) up to and including A000217(n). - R. J. Mathar, Aug 30 2013
The second term is a prime. When is the next prime, if there is another? - N. J. A. Sloane, Dec 16 2016

References

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

Crossrefs

A subsequence of A035333. For primes in latter, see A052087.
See A279610 for a variant.

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@Range[(n(n-1))/2+1,(n(n+1))/2]]],{n,20}] (* Harvey P. Dale, Jan 23 2016 *)
  • PARI
    a(n) = my(s = ""); for (i=n*(n-1)/2 + 1, n*(n+1)/2, s = concat(s, Str(i));); eval(s); \\ Michel Marcus, Aug 11 2017
    
  • Python
    def a(n): return int("".join(map(str, range((n-1)*n//2+1, n*(n+1)//2+1))))
    print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Jan 23 2021

Extensions

More terms from James Sellers, Feb 28 2000
More terms from Michel Marcus, Aug 11 2017

A052087 Primes whose decimal expansion is a concatenation of two or more consecutive increasing numbers (no leading zeros allowed).

Original entry on oeis.org

23, 67, 89, 1213, 3637, 4243, 4567, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, 108109, 120121, 126127, 138139, 150151, 156157, 180181, 186187, 188189, 192193, 200201, 216217, 242243, 246247, 252253, 270271
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Crossrefs

Primes in A035333.

Programs

  • Mathematica
    With[{e = 6}, TakeWhile[Select[Function[s, Union@ Flatten@ Map[Function[k, Map[FromDigits@ Flatten@ IntegerDigits@ # &, Partition[Take[s, 10^(e - k)], k, 1]]], Range[2, e]]]@ Range[10^e], PrimeQ], IntegerLength@ # <= e &]] (* Michael De Vlieger, Apr 23 2017 *)

Extensions

Initial data corrected by Paul Tek, May 07 2013

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

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

A094333 a(1) = 1, a(n) = least proper multiple of a(n-1) which is a concatenation of successive numbers. Terms with more than one digit must be a concatenation of at least two successive numbers.

Original entry on oeis.org

1, 2, 4, 8, 56, 5152, 17181920, 479839479840, 552587148319552587148320, 370210294386175240152319370210294386175240152320
Offset: 1

Views

Author

Amarnath Murthy, May 16 2004

Keywords

Examples

			a(3) = 4 is the smallest proper multiple of 2 which is a concatenation of a (single) number.
a(5) = 56 and a(6) = 5152 =56*92 is the concatenation of 51 and 52.
		

Crossrefs

Extensions

a(7), a(8) from D. S. McNeil, Mar 23 2009
a(9) from Donovan Johnson, Mar 09 2011
a(10) from Paul Tek, Jul 27 2013

A279610 a(n) = concatenate n consecutive integers, starting with the last number of the previous batch.

Original entry on oeis.org

1, 12, 234, 4567, 7891011, 111213141516, 16171819202122, 2223242526272829, 293031323334353637, 37383940414243444546, 4647484950515253545556, 565758596061626364656667, 67686970717273747576777879, 7980818283848586878889909192
Offset: 1

Views

Author

José de Jesús Camacho Medina, Dec 09 2016, and Paolo Iachia, Dec 15 2016

Keywords

Comments

A variant of A053067. The first number of the concatenation a(n) is A152947(n) = (n-2)*(n-1)/2+1 and the last is (n-1)*n/2+1.
The fourth term, 4567, is a prime. When is the next prime, if there is another? - N. J. A. Sloane, Dec 16 2016
a(n) is the concatenation of the terms of the n-th row of A122797 when seen as a triangle. - Michel Marcus, Dec 17 2016

Examples

			a(4) is the concatenation of 4 numbers beginning with the last number (4) that was used to build a(3), so a(4) = 4 5 6 7 = 4567. Then a(5) is the concatenation of 5 numbers beginning with the last number of a(4), which is 7, so a(5) = 7 8 9 10 11 = 7891011. And so on.
For n = 3, n^2/2 - n/2 + 1 = 4; a(3) = 4 + 3*10^1 + 2*10^(1+1) = 234.
		

Crossrefs

A subsequence of A035333. For primes in latter, see A052087.

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits /@ Range[(n(n - 1))/2 + 1, (n(n + 1))/2 + 1 ]]], {n, 0, 20}]
  • Python
    from _future_ import division
    def A279610(n):
        return int(''.join(str(d) for d in range((n-1)*(n-2)//2+1,n*(n-1)//2+2))) # Chai Wah Wu, Dec 17 2016

Formula

a(n) = n^2/2 - n/2 + 1 + Sum{k=1..n-1} ((n^2/2 - n/2 + 1 - k)*10^Sum{j=0..k-1} (floor(1+log_10(n^2/2 - n/2 + 1 - j)))).

A375461 Self-consecutive numbers: numbers m such that there exists a nonnegative integer k for which the concatenation of m, m+1, ..., m+k is an m-digit number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168
Offset: 1

Views

Author

Nicholas M. R. Frieler, Aug 17 2024

Keywords

Comments

Let d be the number of digits of m (in base 10). One can show that the number m is a member of this sequence if and only if:
1) m is divisible by d AND m < 10^d * d/(d+1)
OR
2) 10^d is divisible by d+1 AND m >= 10^d * d/(d+1).
Equivalently, integers m in the block 10^(d-1) <= m < 10^d are included in this sequence based on their relation to the value s = 10^d * d/(d+1). If m < s, then m is in this sequence iff m is divisible by d. If m >= s, m is in this sequence iff s is an integer. Note that for d = 2, s = 66.666... so no integers m in the range 66.666... <= m < 100 are in this sequence. For d = 3, s = 750 is an integer so all integers m in the range 750 <= m < 1000 are in this sequence. - Dominic McCarty, Sep 09 2024

Examples

			7 is a term because if we concatenate 7, 8, 9, 10, and 11, we get 7891011, which has 7 digits.
102 is a term because we can concatenate 102 with the next 33 consecutive integers to get a number with 34*3 = 102 digits.
68 is not a term because if we concatenate 68,69,...,100 we get a 67-digit number and concatenating 101 with this yields a 70-digit number, so it is not possible to achieve a 68-digit number.
		

Crossrefs

Cf. A035333 (concatenations), A375590.

Programs

  • JavaScript
    function next(m){let d=(""+m).length;if(m*(d+1)d*(10**d)){return next(10**d)}else{return m+d}}else{if((10**d)%(d+1)==0){return m+1}else{return next(10**d)}}}let m=0;a="";while(m<168){m=next(m);a+=m+", "}console.log(a) // Dominic McCarty, Sep 09 2024
  • Mathematica
    SelfConsecutiveQ[n_] :=
     Module[{len = Length@IntegerDigits[n], counter = 1, numDigits = 0},
      If[len*(Power[10, len] - n) >= n, Return[Mod[n, len] == 0],
       numDigits = len*(Power[10, len] - n)];
      Mod[n - numDigits, len + 1] == 0
     ]
    Select[Range[1000], SelfConsecutiveQ[#] &]

A225796 a(1) = 1, a(n) = least proper multiple of a(n-1) which is a concatenation of two or more successive numbers.

Original entry on oeis.org

1, 12, 456, 415416, 194191194192, 3816727961538167279616, 35270249819024056401913527024981902405640192
Offset: 1

Views

Author

Paul Tek, Jul 27 2013

Keywords

Examples

			12 is the least proper multiple of 1 in A035333, hence a(2)=12.
456 is the least proper multiple of 12 in A035333, hence a(3)=456.
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-10 of 11 results. Next