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

A299301 Partial sums of A300000.

Original entry on oeis.org

1, 11, 110, 1109, 11099, 110999, 1109999, 11099999, 110999999, 1109999999, 11099999999, 110999999990, 1109999999909, 11099999999099, 110999999990999, 1109999999909990, 11099999999099900, 110999999990999009, 1109999999909990099, 11099999999099900999, 110999999990999009990, 1109999999909990099900, 11099999999099900999000
Offset: 1

Views

Author

N. J. A. Sloane, Feb 25 2018

Keywords

Comments

a(n) is also the concatenation of the first n digits of A300000.

Crossrefs

Cf. A300000.

A299865 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 2.

Original entry on oeis.org

2, 20, 198, 1981, 19818, 198179, 1981783, 19817838, 198178379, 1981783783, 19817837830, 198178378308, 1981783783079, 19817837830783, 198178378307837, 1981783783078363, 19817837830783638, 198178378307836379, 1981783783078363783, 19817837830783637836, 198178378307836378362, 1981783783078363783612
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 2 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			2 + 20 = 22 which is the concatenation of 2 and 2.
2 + 20 + 198 = 220 which is the concatenation of 2, 2 and 0.
2 + 20 + 198 + 1981 = 2201 which is the concatenation of 2, 2, 0 and 1.
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299866, ..., A299872 for variants with a(1) = 3, ..., 9.

Programs

  • PARI
    a(n,show=1,a=2,c=a,d=[c])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.22*10^n, a(n) ~ 0.198*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018

A299872 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 9.

Original entry on oeis.org

9, 90, 891, 8918, 89181, 891802, 8918027, 89180271, 891802702, 8918027027, 89180270270, 891802702701, 8918027027002, 89180270270027, 891802702700263, 8918027027002637, 89180270270026371, 891802702700263702, 8918027027002637027, 89180270270026370262, 891802702700263702622, 8918027027002637026226
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 9 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			9 + 90 = 99 which is the concatenation of 9 and 9.
9 + 90 + 891 = 990 which is the concatenation of 9, 9 and 0.
9 + 90 + 891 + 8918 = 9908 which is the concatenation of 9, 9, 0 and 8.
From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 990 - 99 = 891, a(4) = 9908 - 990 = 8918, etc. - _M. F. Hasler_, Feb 22 2018
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299865, ..., A299871 for variants with a(1) = 2, ..., 8.

Programs

  • PARI
    a(n,show=1,a=9,c=a,d=[a])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits; c(n) ~ 0.99*10^n, a(n) ~ 0.89*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018

A308092 The sum of the first n terms of the sequence is the concatenation of the first n bits of the sequence read as binary, with a(1) = 1.

Original entry on oeis.org

1, 2, 3, 7, 14, 28, 56, 112, 224, 448, 896, 1791, 3583, 7166, 14332, 28663, 57326, 114653, 229306, 458612, 917223, 1834446, 3668892, 7337785, 14675570, 29351140, 58702279, 117404558, 234809116, 469618232, 939236465, 1878472930, 3756945860, 7513891719
Offset: 1

Views

Author

Peter Kagey, May 12 2019

Keywords

Comments

In binary, the sequence begins 1, 10, 11, 111, 1110, 11100, 111000, 1110000, 11100000, 111000000, 1110000000, 11011111111, 110111111111, 1101111111110, 11011111111100, ...
Conjecture: The number of 1's in the binary representation of each term is weakly increasing, i.e., A000120(a(n)) >= A000120(a(n-1)).
Proved by Matthew Scroggs; see link. - Peter Kagey, Jun 19 2019

Examples

			For n=5, 1 + 2 + 3 + 7 + 14 = 1_2 + 10_2 + 11_2 + 111_2 + 1110_2 = 11011_2, the first five bits of the sequence.
		

Crossrefs

Cf. A000120, A300000 (decimal analog).

Programs

  • Mathematica
    a[1]=1;a[2]=2;a[n_]:=a[n]=FromDigits[Flatten[IntegerDigits[#,2]&/@Table[a[k],{k,n-1}]][[;;n]],2]-Total@Table[a[m],{m,n-1}]
    Table[a[l],{l,40}] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
  • Python
    def aupton(terms):
      alst, bstr = [1, 2], "110"
      for n in range(3, terms+1):
        an = int(bstr[:n], 2) - int(bstr[:n-1], 2)
        alst, bstr = alst + [an], bstr + bin(an)[2:]
      return alst
    print(aupton(34)) # Michael S. Branicky, Mar 30 2021
  • Ruby
    def first_bits(n, seq); seq.map { |i| i.to_s(2) }.join[0...n].to_i(2) end
    def next_term(n, seq); first_bits(n,seq) - first_bits(n-1,seq) end
    def a308092_list(n)
      (3..n).reduce([1,2]) { |accum, i| accum << next_term(i, accum) }
    end
    

Formula

a(n) = c(n) - c(n-1) for n > 2, where c(n) is the concatenation of the first n bits of the sequence.

A363186 Lexicographically earliest sequence of distinct positive integers such that the sum of all terms a(1)..a(n) is a substring of the concatenation of all terms a(1)..a(n).

Original entry on oeis.org

1, 10, 98, 767, 111, 122, 2, 11, 100, 889, 110, 4490, 400, 560, 1096, 124, 20, 129, 70, 502, 93, 171, 212, 361, 512, 26, 21, 36, 54, 14, 1011, 139, 99, 59, 550, 684, 345, 102, 1021, 1999, 2871, 137, 892, 89, 126, 875, 510, 994, 586, 2012, 662, 1836, 201, 405, 388, 2007, 2798, 1641, 50, 340
Offset: 1

Views

Author

Scott R. Shannon and Eric Angelini, Jul 07 2023

Keywords

Comments

In the first 10000 terms the smallest number that has not yet appeared is 696; it is therefore likely all numbers eventually appear although this is unknown.

Examples

			a(2) = 10 as a(1) + 10 = 1 + 10 = 11 which is a substring of "1" + "10" = "110".
a(3) = 98 as a(1) + a(2) + 98 = 1 + 10 + 98 = 109 which is a substring of "1" + "10" + "98" = "11098".
a(4) = 767 as a(1) + a(2) + a(3) + 767 = 1 + 10 + 98 + 767 = 876 which is a substring of "1" + "10" + "98" + "767" = "11098767".
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        s, mink, aset, concat = 1, 2, {1}, "1"
        yield from [1]
        while True:
            an = mink
            while an in aset or not str(s+an) in concat+str(an): an += 1
            aset.add(an); s += an; concat += str(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 60))) # Michael S. Branicky, Feb 08 2024

A299866 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, a(1) = 3.

Original entry on oeis.org

3, 30, 297, 2972, 29727, 297268, 2972675, 29726757, 297267568, 2972675675, 29726756750, 297267567507, 2972675675068, 29726756750675, 297267567506755, 2972675675067545, 29726756750675457, 297267567506754568, 2972675675067545675, 29726756750675456754, 297267567506754567542
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 3 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			3 + 30 = 33 which is the concatenation of 3 and 3.
3 + 30 + 297 = 330 which is the concatenation of 3, 3 and 0.
3 + 30 + 297 + 2972 = 3302 which is the concatenation of 3, 3, 0 and 2.
From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 330 - 33 = 297, a(4) = 3302 - 330 = 2972, etc. - _M. F. Hasler_, Feb 22 2018
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299865, ..., A299872 for variants with a(1) = 2, ..., 9.

Programs

  • PARI
    a(n,show=1,a=3,c=a,d=[a])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.33*10^n, a(n) ~ 0.297*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018

A299871 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 8.

Original entry on oeis.org

8, 80, 792, 7927, 79272, 792713, 7927135, 79271352, 792713513, 7927135135, 79271351350, 792713513502, 7927135135013, 79271351350135, 792713513501345, 7927135135013455, 79271351350134552, 792713513501345513, 7927135135013455135, 79271351350134551344, 792713513501345513442, 7927135135013455134424
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 8 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			8 + 80 = 88 which is the concatenation of 8 and 8.
8 + 80 + 792 = 880 which is the concatenation of 8, 8 and 0.
8 + 80 + 792 + 7927 = 8807 which is the concatenation of 8, 8, 0 and 7.
From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 880 - 88 = 792, a(4) = 8807 - 880 = 7927, etc. - _M. F. Hasler_, Feb 22 2018
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299865, ..., A299872 for variants with a(1) = 2, ..., 9.

Programs

  • PARI
    a(n,show=1,a=8,c=a,d=[a])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.88*10^n, a(n) ~ 0.79*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018

A299952 The sum a(n) + a(n+1) is a substring of the concatenation of all terms up to a(n+1). Lexicographic first sequence of positive integers without duplicate terms having this property.

Original entry on oeis.org

1, 10, 99, 11, 80, 19, 61, 30, 31, 49, 12, 2, 4, 5, 3, 6, 7, 15, 9, 13, 17, 14, 8, 16, 20, 25, 23, 22, 26, 27, 18, 34, 28, 21, 24, 29, 32, 35, 36, 44, 37, 43, 38, 33, 41, 39, 42, 40, 51, 45, 46, 47, 52, 57, 53, 56, 54, 55, 63, 59, 50, 60, 58, 64, 66, 65, 74, 48, 62, 68, 71, 77, 72, 67, 78, 70
Offset: 1

Views

Author

Eric Angelini and Lars Blomberg, Feb 22 2018

Keywords

Comments

The sequence starts with a(1) = 1 and is always extended with the smallest integer not yet present that does not lead to a contradiction.
This is probably a permutation of the natural numbers (after 10000 terms, the smallest integer not yet present is 9990).

Examples

			a(1) + a(2) = 1 + 10 = 11 and “11” is visible in [1,10]
a(2) + a(3) = 10 + 99 = 109 and “109” is visible in [10,99]
a(3) + a(4) = 99 + 11 = 110 and “110” is visible in [1,10]
a(4) + a(5) = 11 + 80 = 91 and “91” is visible in [99,11]
a(5) + a(6) = 80 + 19 = 99 and “99” is visible in [99]
a(6) + a(7) = 19 + 61 = 80 and “80” is visible in [80]
...
		

Crossrefs

Cf. A300000.
For a different constraint on a(n)+a(n+1) (must have a digit '1'), see A299957 and A299970, A299982, ..., A299988, A299969 (nonnegative analog with digit 0, 2, ..., 9), A299971, A299972, ..., A299979 (positive analog with digit 0, 2, ..., 9).
Cf. A299980, A299981, A299402, A299403, A298974, A298975, A299996, A299997, A298978, A298979 for the analog using multiplication: a(n)*a(n+1) has a digit 0, resp. 1, ..., resp. 9.

Programs

  • Mathematica
    Nest[Function[a, Append[a, Block[{k = 1, d}, While[Nand[FreeQ[a, k], SequenceCount[Flatten@ IntegerDigits[Append[a, k]], IntegerDigits[a[[-1]] + k]] > 0], k++]; k]]], {1}, 75] (* Michael De Vlieger, Feb 22 2018 *)
  • PARI
    a(n,show=1,a=1,s=a,u=[a],t,m)={for(n=2,n, show&&print1(a","); for(k=u[1]+1,oo, setsearch(u,k)&&next;m=Mod(a+k,10^#Str(a+k));t=s*10^#Str(k)+k; until(k>=t\=10,t==m&&(a=k)&&break(2)));s=s*10^#Str(a)+a;u=setunion(u,[a]); u[2]==u[1]+1&&u=u[^1]);a} \\ M. F. Hasler, Feb 22 2018

A299867 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 4.

Original entry on oeis.org

4, 40, 396, 3963, 39636, 396357, 3963567, 39635676, 396356757, 3963567567, 39635675670, 396356756706, 3963567567057, 39635675670567, 396356756705673, 3963567567056727, 39635675670567276, 396356756705672757, 3963567567056727567, 39635675670567275672, 396356756705672756722
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 4 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			4 + 40 = 44 which is the concatenation of 4 and 4.
4 + 40 + 396 = 440 which is the concatenation of 4, 4, and 0.
4 + 40 + 396 + 3963 = 4403 which is the concatenation of 4, 4, 0 and 3.
From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 440 - 4 = 396, a(4) = 4403 - 440 = 3963, etc. - _M. F. Hasler_, Feb 22 2018
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299865, ..., A299872 for variants with a(1) = 2, ..., 9.

Programs

  • PARI
    a(n,show=1,a=4,c=a,d=[a])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.44*10^n, a(n) ~ 0.396*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018

A299868 The sum of the first n terms of the sequence is the concatenation of the first n digits of the sequence, and a(1) = 5.

Original entry on oeis.org

5, 50, 495, 4954, 49545, 495446, 4954459, 49544595, 495445946, 4954459459, 49544594590, 495445945905, 4954459459046, 49544594590459, 495445945904591, 4954459459045909, 49544594590459095, 495445945904590946, 4954459459045909459, 49544594590459094590, 495445945904590945902, 4954459459045909459018
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 21 2018

Keywords

Comments

The sequence starts with a(1) = 5 and is always extended with the smallest integer not yet present in the sequence and not leading to a contradiction.

Examples

			5 + 50 = 55 which is the concatenation of 5 and 5.
5 + 50 + 495 = 550 which is the concatenation of 5, 5 and 0.
5 + 50 + 495 + 4954 = 5504 which is the concatenation of 5, 5, 0 and 4.
From n = 3 on, a(n) can be computed directly as c(n) - c(n-1), cf. formula: a(3) = 550 - 55 = 495, a(4) = 5504 - 550 = 4954, etc. - _M. F. Hasler_, Feb 22 2018
		

Crossrefs

A300000 is the lexicographically first sequence of this type, with a(1) = 1.
Cf. A299865, ..., A299872 for variants with a(1) = 2, ..., 9.

Programs

  • PARI
    a(n,show=1,a=5,c=a,d=[a])={for(n=2,n,show&&print1(a",");a=-c+c=c*10+d[1];d=concat(d[^1],if(n>2,digits(a))));a} \\ M. F. Hasler, Feb 22 2018

Formula

a(n) = c(n) - c(n-1), where c(n) = concatenation of the first n digits, c(n) ~ 0.55*10^n, a(n) ~ 0.495*10^n. See A300000 for the proof. - M. F. Hasler, Feb 22 2018
Showing 1-10 of 15 results. Next