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.

Previous Showing 41-50 of 104 results. Next

A102782 Repunit semiprimes.

Original entry on oeis.org

111, 1111, 11111, 1111111, 11111111111, 11111111111111111, 11111111111111111111111111111111111111111111111, 11111111111111111111111111111111111111111111111111111111111
Offset: 1

Views

Author

Shyam Sunder Gupta, Feb 11 2005

Keywords

Examples

			a(2)=1111 because 1111=11*101, so 1111 is semiprime as well as a repunit number.
		

Crossrefs

Cf. A046413 the repunit of length n has exactly 2 prime factors.

Programs

  • Mathematica
    Select[Table[FromDigits[PadRight[{},n,1]],{n,60}],PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 28 2013 *)

Formula

a(n) = A000042(A046413(n-1)). - Ray Chandler, Sep 06 2005

A108047 Concatenation of the previous pair of numbers, with the first two terms both 1.

Original entry on oeis.org

1, 1, 11, 111, 11111, 11111111, 1111111111111, 111111111111111111111, 1111111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111, 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
Offset: 1

Views

Author

Parthasarathy Nambi, Jun 01 2005

Keywords

Comments

The Fibonacci numbers, A000045, represented in base 1 (see A000042).

Examples

			The third term is 11 which is the concatenation of the first two terms 1 and 1.
		

Crossrefs

Column b=1 of A214326.
Column k=1 of A214679.

Formula

a(n) = (10^A000045(n)-1)/9.
a(n) = A000042(A000045(n)).

Extensions

Edited by Jason Kimberley, Dec 15 2012

A046412 Lengths of nonsquarefree repunits.

Original entry on oeis.org

9, 18, 22, 27, 36, 42, 44, 45, 54, 63, 66, 72, 78, 81, 84, 88, 90, 99, 108, 110, 111, 117, 126, 132, 135, 144, 153, 154, 156, 162, 168, 171, 176, 180, 189, 198, 205, 207, 210, 216, 220, 222, 225, 234, 242, 243, 252, 261, 264, 270, 272, 279, 286, 288, 294, 297, 306, 308, 312, 315, 324, 330, 333, 336, 342, 351, 352
Offset: 1

Views

Author

Patrick De Geest, Jul 15 1998

Keywords

Comments

This is the set of all positive multiples of all positive members of A087094. What is the asymptotic density of this set? - Jeppe Stig Nielsen, Dec 28 2015

Crossrefs

Programs

  • Maple
    remove(t -> numtheory:-issqrfree((10^t-1)/9), [$1..90]); # Robert Israel, Dec 30 2015
  • Mathematica
    Select[Range[300],!SquareFreeQ[(10^#-1)/9]&] (* Harvey P. Dale, Jun 26 2013 *)
  • PARI
    isok(n) = ! issquarefree((10^n-1)/9); \\ Michel Marcus, Dec 31 2015

Formula

a(n)=k where (10^k-1)/9 is not squarefree. - Ray Chandler, Aug 10 2003

Extensions

Terms to a(60) from Ray Chandler, Aug 10 2003
a(61)-a(67) from Max Alekseyev, Apr 29 2022

A052983 Least multiple of n consisting of a succession of 1's followed by a succession of 0's.

Original entry on oeis.org

10, 10, 1110, 100, 10, 1110, 1111110, 1000, 1111111110, 10, 110, 11100, 1111110, 1111110, 1110, 10000, 11111111111111110, 1111111110, 1111111111111111110, 100, 1111110, 110, 11111111111111111111110, 111000, 100, 1111110, 1111111111111111111111111110
Offset: 1

Views

Author

Lekraj Beedassy, Jun 26 2003

Keywords

Comments

All entries are differences of two terms of A000042. Since the pigeonhole principle guarantees that, for any m, two among the first m+1 entries of A000042 are congruent modulo m, their difference (i.e. belonging to this sequence) is therefore divisible by m, so that such numbers exist for all m. This sequence is thus infinite.
For n>1, a(n) consists of s 1's and t 0's, where s=A084681(X) and t is the greater of p or q (s=1 for X=1, t=1 for p=q=0), when we write n=X*Y with (X,Y)=1 and Y=2^p*5^q.

Examples

			We have a(6)=1110 because 6 divides 1110=6*185, the smallest such one with a string of 1's followed by that of 0's
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Select[ Map[ FromDigits, IntegerDigits[ Table[ Sum[2^i, {i, k, j, -1}], {j, k, 1, -1}], 2]]/n, IntegerQ[ # ] & ]; g[n_] := Block[{k = 1}, While[ f[n] == {}, k++ ]; n*Min[ f[n]]]; Table[ g[n], {n, 1, 27}]
    nn=30;With[{nos=Sort[Flatten[Table[FromDigits[Join[Table[1,{n}], Table[ 0,{i}]]],{n,nn},{i,5}]]]},Flatten[Table[Select[nos,Divisible[#,n]&,1],{n,nn}]]] (* Harvey P. Dale, Mar 09 2014 *)

Formula

a(n) = A276348(n) * n; A227362(a(n)) = 10. - Jaroslav Krizek, Aug 30 2016

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 26 2003

A083811 Numbers n such that 2n+1 is the digit reversal of n+1.

Original entry on oeis.org

36, 396, 3996, 39996, 399996, 3999996, 39999996, 399999996, 3999999996, 39999999996, 399999999996, 3999999999996
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 08 2003

Keywords

Comments

1. a(n) = 36 + 360 + 3600+ ...+ up to n terms. a(n) = sum of n terms of the geometric progression with the first term 36 and common ratio 10. 2. a(n) = 36*A000042(n).( the unary sequence).

Examples

			36 + 1 = 37, 2*36 + 1 = 73.
		

Crossrefs

Cf. A000042.

Formula

a(n) = 4*(10^n - 1).

A111066 Numbers with digits 1 and 2 and at least one of each.

Original entry on oeis.org

12, 21, 112, 121, 122, 211, 212, 221, 1112, 1121, 1122, 1211, 1212, 1221, 1222, 2111, 2112, 2121, 2122, 2211, 2212, 2221, 11112, 11121, 11122, 11211, 11212, 11221, 11222, 12111, 12112, 12121, 12122, 12211, 12212, 12221, 12222, 21111, 21112, 21121, 21122, 21211
Offset: 1

Views

Author

Alexandre Wajnberg & Youri Mora, Oct 08 2005

Keywords

Crossrefs

Equals A007931 minus A000042 and A002276. Supersequence of A214218.

Programs

  • Mathematica
    FromDigits /@ Select[ IntegerDigits[ Range[210], 3], Union[ # ] == {1, 2} &] (* Robert G. Wilson v, Oct 09 2005 *)
    Union[FromDigits/@Select[Flatten[Table[Tuples[{1,2},n],{n,2,5}],1], Union[#] == {1,2}&]] (* Harvey P. Dale, Sep 05 2013 *)
  • Python
    from itertools import count, islice
    def agen():
        for i in count(1):
            s = bin(i+1)[3:].replace('1', '2').replace('0', '1')
            if 0 < s.count('1') < len(s):
                yield int(s)
    print(list(islice(agen(), 42))) # Michael S. Branicky, Dec 21 2021

Extensions

More terms from Robert G. Wilson v, Oct 09 2005
Crossrefs from Charles R Greathouse IV, Aug 03 2010

A130835 Sum of all numbers having n or fewer digits and having the sum of their digits equal to n.

Original entry on oeis.org

1, 33, 1110, 38885, 1399986, 51333282, 1906666476, 71499999285, 2701111108410, 102631111100848, 3917722222183045, 150126888888738762, 5771538888888311735, 222499777777775552780, 8598259999999991401740, 332968856666666633369781, 12918171566666666537484951
Offset: 1

Views

Author

J. M. Bergot, Jul 18 2007

Keywords

Examples

			Take n = 3. The numbers to be summed are 111, 3, 30, 300, 210, 201, 120, 102, 21 and 12, which add to 1110.
		

Crossrefs

Programs

  • Maple
    A007953 := proc(n) add(i,i=convert(n,base,10)) ; end: A130835 := proc(n) local a,i; a := 0 ; for i from 1 to 10^n-1 do if A007953(i) = n then a := a+i ; fi ; od ; RETURN(a) ; end: seq(A130835(n),n=1..4) ; # R. J. Mathar, Aug 01 2007
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i=0, 0, add(b(n-j, i-1), j=0..min(n, 9))))
        end:
    a:= n-> b(n, n)*(10^n-1)/9:
    seq(a(n), n=1..20); # Alois P. Heinz, Nov 02 2009

Formula

a(n) = (10^n-1)/9 * [x^n] ((x^10-1)/(x-1))^n. - Alois P. Heinz, Feb 07 2012
a(n) = A000042(n) * A167403(n) = A002275(n) * A167403(n). - Alois P. Heinz, Aug 16 2018

Extensions

a(4)-a(6) from R. J. Mathar, Aug 01 2007
a(7)-a(12) from Donovan Johnson, Jul 02 2009
More terms from Alois P. Heinz, Nov 02 2009

A136308 a(n) = (10^2^n - 1)/9.

Original entry on oeis.org

1, 11, 1111, 11111111, 1111111111111111, 11111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111111111111
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 22 2008

Keywords

Comments

More generally, reading in base B >= 2: a(n) = (B^2^n - 1)/(B-1).
Recurrence: a(n) = a(n-1)*(B^K + 1) and a(0)=1 where K = floor(log_B a(n-1)) + 1.
B = 2 gives A051179; B = 3 gives A059918.

Crossrefs

Cf. A000042 (repunits).
In other bases: A051179, A059918.

Programs

Formula

a(n) = a(n-1)*(10^K + 1) and a(0)=1 where K=floor(log_10 a(n-1)) + 1 = 2^n + 1.
a(n) = A000042(A000079(n)) = A007088(A051179(n)) = A007089(A059918(n)).
A007953(a(n)) = 2^n. - Stefano Spezia, Mar 27 2025

Extensions

Edited by Jason Kimberley, Dec 18 2012

A309761 Numbers that are sums of consecutive powers of 10.

Original entry on oeis.org

1, 10, 11, 100, 110, 111, 1000, 1100, 1110, 1111, 10000, 11000, 11100, 11110, 11111, 100000, 110000, 111000, 111100, 111110, 111111, 1000000, 1100000, 1110000, 1111000, 1111100, 1111110, 1111111, 10000000, 11000000, 11100000, 11110000, 11111000, 11111100
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 15 2019

Keywords

Comments

Numbers of the form (10^i - 10^j)/9 with i > j.

Examples

			11100 = 10^2 + 10^3 + 10^4, so 11100 is in the sequence.
		

Crossrefs

Programs

  • Maple
    seq(seq((10^i-10^(i-j))/9, j=1..i),i=1..10); # Robert Israel, Aug 16 2019
  • Python
    from math import isqrt
    def A309761(n): return (10**(m:=isqrt(n<<3)+1>>1)-10**(m*(m+1)-(n<<1)>>1))//9 # Chai Wah Wu, Apr 04 2025

Formula

a(n) = A007088(A023758(n+1)).
a(i*(i-1)/2 + j) = (10^i - 10^(i-j))/9 for 1<=j<=i. - Robert Israel, Aug 16 2019
a(n) = A276349(n)/10. - Chai Wah Wu, Jun 16 2025

A048612 Find smallest pair (x,y) such that x^2-y^2 = 11...1 (n times) = (10^n-1)/9; sequence gives value of y.

Original entry on oeis.org

0, 5, 17, 45, 115, 67, 2205, 2933, 166667, 44445, 245795, 6667, 132683733, 4444445, 2012917, 23767083, 2680575317, 666667, 555555555555555555, 83053525, 3263104267, 12488376483, 5555555555555555555555, 66666667, 2952525627555
Offset: 1

Views

Author

Keywords

Comments

Least solutions for 'Difference between two squares is a repunit of length n'.

Examples

			For n=2, 6^2 - 5^2 = 11.
		

References

  • David Wells, "Curious and Interesting Numbers", Revised Ed. 1997, Penguin Books, p. 119. ISBN 0-14-026149-4.

Crossrefs

Programs

  • Mathematica
    s = Flatten[Table[r = (10^i - 1)/9; d = Divisors[r]; p = d[[Length[d]/2]]; Solve[{x - y == p, x + y == r/p}, {y, x}], {i, 2, 56}]]; Prepend[Cases[s, Rule[y, n_] -> n], 0]
    Join[{0},Table[y/.Solve[{x>0,y>0,x^2-y^2==FromDigits[PadRight[{},n,1]]},{x,y},Integers][[1]],{n,2,30}]](* Harvey P. Dale, Jun 12 2018 *)
  • Python
    from sympy import divisors
    def A048612(n):
        d = divisors((10**n-1)//9)
        l = len(d)
        return (d[l//2]-d[(l-1)//2])//2 # Chai Wah Wu, Apr 05 2021

Formula

a(n) = (A033677((10^n-1)/9)-A033676((10^n-1)/9))/2. - Chai Wah Wu, Apr 05 2021

Extensions

Corrected and extended by Patrick De Geest, Jun 15 1999
More terms from Hans Havermann, Jul 02 2000
Offset corrected by Chai Wah Wu, Apr 05 2021
Previous Showing 41-50 of 104 results. Next