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

A055558 Primes of the form 1999...999.

Original entry on oeis.org

19, 199, 1999, 199999, 19999999, 199999999999999999999999999, 1999999999999999999999999999, 199999999999999999999999999999999999999999999999999999
Offset: 1

Views

Author

Labos Elemer, Jul 10 2000

Keywords

Comments

Primes of the form 2*10^k - 1.

Examples

			2*10^n - 1 is prime for {1,2,3,5,7,26,27,53,147,236,248,386,401}; in each of these numbers, the digit '9' appears n times.
		

Crossrefs

Subsequence of A090149.
Primes in A067272.

Programs

Formula

a(n) = 2*10^A002957(n) - 1 = A067272(A002957(n) + 1). - Elmo R. Oliveira, Jun 14 2025

A246057 a(n) = (5*10^n - 2)/3.

Original entry on oeis.org

1, 16, 166, 1666, 16666, 166666, 1666666, 16666666, 166666666, 1666666666, 16666666666, 166666666666, 1666666666666, 16666666666666, 166666666666666, 1666666666666666, 16666666666666666, 166666666666666666, 1666666666666666666, 16666666666666666666, 166666666666666666666
Offset: 0

Views

Author

Vincenzo Librandi, Aug 13 2014

Keywords

Comments

a(k-1) = (10^k - 4)/6, together with b(k) = 3*a(k-1) + 2 = A093143(k) and c(k) = 2*a(k-1) + 1 = A002277(k) are k-digit numbers for k >= 1 satisfying the so-called curious cubic identity a(k-1)^3 + b(k)^3 + c(k)^3 = a(k)*10^(2*k) + b(k)*10^k + c(k) (concatenated a(k)b(k)c(k)). This k-family and the proof of the identity has been given in the introduction of the van der Poorten reference. Thanks go to S. Heinemeyer for bringing these identities to my attention. - Wolfdieter Lang, Feb 07 2017

Examples

			Curious cubic identities (see a comment and reference above): 1^3 + 5^3 + 3^3 = 153, 16^3 + 50^3 + 33^3 = 165033, 166^3 + 500^3 + 333^3 = 166500333, ... - _Wolfdieter Lang_, Feb 07 2017
		

Crossrefs

Cf. sequences with terms of the form 1k..k where the digit k is repeated n times: A000042 (k=1), A090843 (k=2), A097166 (k=3), A099914 (k=4), A099915 (k=5), this sequence (k=6), A246058 (k=7), A246059 (k=8), A067272 (k=9).

Programs

  • Magma
    [(5*10^n-2)/3: n in [0..20]];
    
  • Mathematica
    Table[(5 10^n - 2)/3, {n, 0, 20}]
  • PARI
    vector(50, n, (5*10^(n-1)-2)/3) \\ Derek Orr, Aug 13 2014

Formula

G.f.: (1 + 5*x)/((1 - x)*(1 - 10*x)).
a(n) = 11*a(n-1) - 10*a(n-2).
E.g.f.: exp(x)*(5*exp(9*x) - 2)/3. - Stefano Spezia, May 02 2025
a(n) = A323639(n+1)/2 = A086948(n+1)/12. - Elmo R. Oliveira, May 07 2025

A366165 a(n) is the least k > 0 such that 10^(2*n-1) - k can be written as a product j*m, where j and m have an equal number of decimal digits.

Original entry on oeis.org

1, 1, 1, 1, 10, 1, 3, 1, 5, 3, 1, 6, 1, 7, 1, 2, 2, 1, 4, 7, 5, 1, 1, 3, 2, 1, 1, 1, 1, 2, 1, 1, 10, 4, 3, 3, 10, 1, 2, 3, 1, 1, 1, 7, 1, 1
Offset: 1

Views

Author

Hugo Pfoertner, Oct 04 2023

Keywords

Comments

a(n) <= 10 since 10^(2n-1)-10 = (10^(n-1)+1)(10^n-10). A consequence is that j and m in the product both have n decimal digits. - Chai Wah Wu, Oct 05 2023

Examples

			n a(n) 10^(2n-1)-a(n)       j       m
1  1   9                    1       9
2  1   999                 27      37
3  1   99999              123     813
4  1   9999999           2151    4649
5 10   999999990        10001   99990
6  1   99999999999     194841  513239
7  3   9999999999997  2769823 3610339
More than one pair (j,m) may exist, e.g., 9 = 1*9 = 3*3.
		

Crossrefs

A067272 are the solutions for even exponents of 10, corresponding to (j,m) = (9,9), (99,99), (999,999), ... .

Programs

  • PARI
    a366165(n)={my (p10=10^(2*n-1)); for (dd=1, p10, my (d=p10-dd); fordiv (d, x, fordiv (d, y, if (x*y==d && #digits(x)==#digits(y), return(dd)))))};
    
  • Python
    from itertools import count, takewhile
    from sympy import divisors
    def A366165(n):
        a, l1, l2 = 10**((n<<1)-1), 10**(n-1), 10**n
        for k in count(1):
            b = a-k
            if any(l1<=db for d in takewhile(lambda m:m*m<=b, divisors(b))):
                return k # Chai Wah Wu, Oct 05 2023

Extensions

a(33)-a(35) from Chai Wah Wu, Oct 05 2023
a(36)-a(46) from Chai Wah Wu, Oct 07 2023

A175603 a(n) = 8*(10^n-5).

Original entry on oeis.org

40, 760, 7960, 79960, 799960, 7999960, 79999960, 799999960, 7999999960, 79999999960, 799999999960, 7999999999960, 79999999999960, 799999999999960, 7999999999999960, 79999999999999960, 799999999999999960
Offset: 1

Views

Author

Vincenzo Librandi Nov 15 2010

Keywords

Crossrefs

Equals 40 * A067272.

Programs

  • Magma
    [8*(10^n-5): n in [1..30]]; // Vincenzo Librandi, Oct 05 2014
  • Mathematica
    CoefficientList[Series[40 (1 + 8 x)/((10 x - 1) (x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 05 2014 *)
    LinearRecurrence[{11,-10},{40,760},20] (* Harvey P. Dale, May 12 2022 *)

Formula

G.f.: 40*x*(1+8*x) / ( (10*x-1)*(x-1) ). - R. J. Mathar, Aug 24 2011

A177074 3*(10^n-5).

Original entry on oeis.org

15, 285, 2985, 29985, 299985, 2999985, 29999985, 299999985, 2999999985, 29999999985, 299999999985, 2999999999985, 29999999999985, 299999999999985, 2999999999999985, 29999999999999985, 299999999999999985
Offset: 1

Views

Author

Keywords

Comments

Apparently 15 times the entries in A067272. - R. J. Mathar, Aug 24 2011

Programs

  • Magma
    [3*(10^n-5): n in [1..20]]; // Vincenzo Librandi, Apr 26 2014
  • Mathematica
    Table[3*(10^n-5),{n,20}] (* or *) LinearRecurrence[{11,-10},{15,285},20] (* Harvey P. Dale, Apr 25 2014 *)
    CoefficientList[Series[15 (1 + 8 x)/((10 x - 1) (x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Apr 26 2014 *)

Formula

G.f. 15*x*(1+8*x) / ( (10*x-1)*(x-1) ). - R. J. Mathar, Aug 24 2011
a(n) = 11*a(n-1) - 10*a(n-2), n>1. - Vincenzo Librandi, Apr 26 2014

A177109 a(n) = 4*(10^n-5).

Original entry on oeis.org

20, 380, 3980, 39980, 399980, 3999980, 39999980, 399999980, 3999999980, 39999999980, 399999999980, 3999999999980, 39999999999980, 399999999999980, 3999999999999980, 39999999999999980, 399999999999999980
Offset: 1

Views

Author

Vincenzo Librandi, Nov 15 2010

Keywords

Comments

Is this 20*A067272(n)?

Crossrefs

Cf. A067272.

Programs

Formula

G.f.: 20*x*(1+8*x) / ( (10*x-1)*(x-1) ). - R. J. Mathar, Jan 06 2011
a(n) = 11*a(n-1) - 10*a(n-2). - Wesley Ivan Hurt, Mar 17 2023

A177097 a(n) = 6*(10^n-5).

Original entry on oeis.org

30, 570, 5970, 59970, 599970, 5999970, 59999970, 599999970, 5999999970, 59999999970, 599999999970, 5999999999970, 59999999999970, 599999999999970, 5999999999999970, 59999999999999970, 599999999999999970
Offset: 1

Views

Author

Keywords

Comments

Apparently 30 times the entries of A067272. - R. J. Mathar, Aug 24 2011

Crossrefs

Cf. A067272.

Programs

  • Mathematica
    Join[{30,570},FromDigits/@(Join[{5},#,{7,0}]&/@Table[PadLeft[{},n,9], {n,20}])] (* or *) LinearRecurrence[{11,-10},{30,570},20] (* Harvey P. Dale, Oct 10 2011 *)

Formula

G.f.: 30*x*(1+8*x) / ( (10*x-1)*(x-1) ). - R. J. Mathar, Aug 24 2011
a(1)=30, a(2)=570, a(n)=11*a(n-1)-10*a(n-2). [Harvey P. Dale, Oct 10 2011]

A374024 Integers k such that digsum(k) = digsum(k^2) = p, where p is prime and digsum(i) = A007953(i).

Original entry on oeis.org

199, 289, 379, 388, 496, 559, 568, 595, 739, 775, 838, 955, 1099, 1189, 1198, 1468, 1495, 1585, 1738, 1747, 1765, 1792, 1855, 1990, 2098, 2494, 2665, 2881, 2890, 3169, 3196, 3259, 3349, 3466, 3493, 3745, 3790, 3880, 4249, 4519, 4735, 4951, 4960, 5149, 5482
Offset: 1

Views

Author

Gonzalo Martínez, Jul 05 2024

Keywords

Comments

Subsequence of A058369.
If k is a term, then digsum(k) = 19, 37 or 73, for k < 10^9.
If k is an integer such that digsum(k) = digsum(k^2) = p, with p prime, then p == 1 (mod 9) (A061237).
This sequence has infinitely many terms of the form 1999...9 (A067272). If p is a prime with p == 1 (mod 9), i.e., p = 9m + 1 for some m, then t = 2*10^m - 1 = 1999...9, i.e., 1 followed by m 9's, is in this sequence since digsum(t) = 9m + 1 = p and t^2 = 39...960...01, where there are (m - 1) 9's and (m - 1) 0's, so digsum(t^2) = 3 + 9*(m - 1) + 6 + 1 = 9m + 1 = p. Dirichlet's theorem guarantees the existence of infinitely many primes of the form 9w + 1 and hence infinitely many terms of this sequence.
2*10^m - 1 is the least number with digit sum 9*m + 1. Since the next prime congruent to 1 (mod 9) after 73 is 109 = 9*12 + 1, the first term with digit sum other than 19, 37 or 73 is 2*10^12 - 1. - Robert Israel, Jul 07 2024

Examples

			199 is a term, because its digital sum is 1 + 9 + 9 = 19 and 199^2 = 39601, whose digital sum is 3 + 9 + 6 + 0 + 1 = 19, which is prime.
		

Crossrefs

Programs

  • Maple
    ds:= n -> convert(convert(n,base,10),`+`):
    filter:= proc(n) local p;
      p:= ds(n);
      isprime(p) and ds(n^2) = p
    end proc:
    select(filter, [seq(i,i=1..1000, 9)]); # Robert Israel, Jul 05 2024
  • Mathematica
    Select[Range[5490],PrimeQ[dg=DigitSum[#]]&&(dg==DigitSum[#^2])&] (* Stefano Spezia, Jul 05 2024 *)
  • PARI
    isok(k) = my(s=sumdigits(k)); isprime(s) && (s==sumdigits(k^2)); \\ Michel Marcus, Jul 06 2024
Showing 1-8 of 8 results.