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

A132026 Decimal expansion of Product_{k>=0} (1 - 1/(2*10^k)).

Original entry on oeis.org

4, 7, 2, 3, 6, 2, 4, 4, 3, 8, 1, 6, 5, 7, 2, 2, 3, 6, 5, 5, 1, 4, 1, 3, 3, 8, 3, 3, 3, 2, 3, 2, 7, 3, 5, 3, 3, 4, 9, 6, 6, 4, 2, 9, 5, 8, 5, 0, 2, 2, 1, 9, 4, 6, 2, 1, 8, 8, 9, 0, 9, 6, 1, 1, 7, 7, 8, 7, 1, 9, 9, 4, 4, 2, 6, 0, 1, 3, 0, 7, 7, 9, 5, 4, 2, 9, 4, 3, 2, 5, 3, 0, 7, 2, 3, 0, 7, 8, 1, 1, 8, 1, 2
Offset: 0

Views

Author

Hieronymus Fischer, Jul 28 2007

Keywords

Examples

			0.472362443816572236551413383332...
		

Crossrefs

Programs

  • Mathematica
    digits = 103; Product[1-1/(2*10^k), {k, 0, Infinity}] // N[#, digits+1]& // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Feb 18 2014 *)
    RealDigits[QPochhammer[1/2, 1/10], 10, 100][[1]] (* Jan Mangaldan, Jan 04 2017 *)
  • PARI
    prodinf(k=0, 1 - 1/(2*10^k)) \\ Amiram Eldar, May 09 2023

Formula

Equals lim inf_{n->oo} Product_{k=0..floor(log_10(n))} floor(n/10^k)*10^k/n.
Equals lim inf_{n->oo} A067080(n)/n^(1+floor(log_10(n)))*10^(1/2*(1+floor(log_10(n)))*floor(log_10(n))).
Equals lim inf_{n->oo} A067080(n)/n^(1+floor(log_10(n)))*10^A000217(floor(log_10(n))).
Equals lim inf_{n->oo} A067080(n)/A067080(n+1).
Equals 1/2*exp(-Sum_{n>0} 10^(-n)*Sum_{k|n} 1/(k*2^k)).
Equals Product_{n>=1} (1 - 1/A093136(n)). - Amiram Eldar, May 09 2023

A169965 Numbers whose decimal expansion contains only 0's and 2's.

Original entry on oeis.org

0, 2, 20, 22, 200, 202, 220, 222, 2000, 2002, 2020, 2022, 2200, 2202, 2220, 2222, 20000, 20002, 20020, 20022, 20200, 20202, 20220, 20222, 22000, 22002, 22020, 22022, 22200, 22202, 22220, 22222, 200000, 200002, 200020, 200022, 200200, 200202, 200220, 200222
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2010

Keywords

Crossrefs

Programs

  • Haskell
    a169965 n = a169965_list !! (n-1)
    a169965_list = map (* 2) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    Map[FromDigits,Tuples[{0,2},6]] (* Paolo Xausa, Oct 30 2023 *)
  • PARI
    print1(0);for(d=1,5,for(n=2^(d-1),2^d-1,print1(", ");forstep(i=d-1,0,-1,print1((n>>i)%2*2)))) \\ Charles R Greathouse IV, Nov 16 2011
    
  • PARI
    lista(N) = vector(N, i, fromdigits(binary(i-1)*2)); \\ Ruud H.G. van Tol, Oct 26 2024
    

Formula

a(n+1) = Sum_{k>=0} A030308(n,k)*A093136(k+1). - Philippe Deléham, Oct 16 2011
a(n) = 2 * A007088(n-1).

A349194 a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 49, 56, 63, 70, 77
Offset: 1

Views

Author

Malo David, Nov 10 2021

Keywords

Comments

The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021

Examples

			For n=256, a(256) = 2*(2+5)*(2+5+6) = 182.
		

Crossrefs

Cf. A055642, A284001 (binary analog), A349190 (fixed points).
Cf. A007953 (sum of digits), A059995 (floor(n/10)).
Cf. A349278 (similar, with the last digits).

Programs

  • Magma
    f:=func; [f(n):n in [1..100]]; // Marius A. Burtea, Nov 23 2021
  • Mathematica
    Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* Stefano Spezia, Nov 10 2021 *)
  • PARI
    a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ Charles R Greathouse IV, Dec 04 2021
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return prod(accumulate(map(int, str(n))))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
    

Formula

For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
a(A002275(n)) = n! = A000142(n), n >= 1.
a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
a(A097166(n)) = (3*n - 2)!!! = A007559(n).
a(A093136(n)) = 2^n = A000079(n).
a(A093138(n)) = 3^n = A000244(n). (End)

A178501 Zero followed by powers of ten.

Original entry on oeis.org

0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000, 100000000000000000, 1000000000000000000, 10000000000000000000, 100000000000000000000
Offset: 0

Views

Author

Reinhard Zumkeller, May 28 2010

Keywords

Comments

The sequence S consisting of the nonnegative numbers arranged in lexicographic order according to their decimal expansion begins 0, 1, 10, 100, 1000, ..., 2, 20, 200, 2000, ..., 3, 30, ... does not have an OEIS entry, since there are uncountably many terms before 2 appears (or even before 100000010000 appears). However, S does begin with the present sequence. - N. J. A. Sloane, Dec 09 2024
a(n)^k + reverse(a(n))^k is a palindrome for any positive integer k. - Bui Quang Tuan, Mar 31 2015

Crossrefs

Cf. A093136, A131577, A140429, A178500; subsequence of A029793.
The powers of 10, A011557, is a subsequence.

Programs

Formula

a(n+1) = A011557(n).
a(n) = A178500(n)/10.
From Paul Barry, Jul 09 2003: (Start)
a(n) = (10^n - 0^n)/10.
E.g.f.: exp(5*x)*sinh(5*x)/5.
Binomial transform of A015577. (End)
G.f.: x/(1 - 10*x). - Chai Wah Wu, Jun 17 2020
From Elmo R. Oliveira, Jul 21 2025: (Start)
a(n) = 10*a(n-1) for n > 1.
a(n) = A093136(n)/2 for n >= 1. (End)

Extensions

More terms from Elmo R. Oliveira, Jul 21 2025

A352159 Numbers m such that the smallest digit in the decimal expansion of 1/m is 5, ignoring leading and trailing 0's.

Original entry on oeis.org

2, 18, 20, 132, 148, 180, 200, 1320, 1480, 1800, 2000, 13008, 13200, 14544, 14800, 18000, 20000, 130080, 132000, 145440, 148000, 180000, 200000, 1300800, 1320000, 1454400, 1480000, 1734375, 1800000, 2000000, 11521152, 12890625, 13008000, 13200000, 14544000, 14800000
Offset: 1

Views

Author

Keywords

Comments

Leading 0's are not considered, otherwise every integer >= 11 would be a term (see examples).
Trailing 0's are also not considered, otherwise numbers of the form 2^i*5^j with i, j >= 0, apart from 1 (A003592) would be terms.
If k is a term, 10*k is also a term; so, terms with no trailing zeros are all primitive terms: 2, 18, 132, 148, 14544, ...

Examples

			m = 148 is a term since 1/148 = 0.00675675675... and the smallest digit after the leading 0's is 5.
m = 1320 is a term since 1/1320 = 0.000075757575... and the smallest digit after the leading 0's is 5.
		

Crossrefs

Cf. A351471.
Subsequence: A093136 \ {0}.
Similar with smallest digit k: A352154 (k=0), A352155 (k=1), A352156 (k=2), A352157 (k=3), A352158 (k=4), this sequence (k=5), A352160 (k=6), A352153 (no known term for k=7), A352161 (k=8), no term (k=9).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[ Range@ 1100, Min@ f@# == 5 &]
  • PARI
    is(n) = my(d=#digits(n-1), m=9, r=10^d, x=valuation(n, 2), y=valuation(n, 5)); for(k=1, max(x,y)-d*(n==x=2^x*5^y)+znorder(Mod(10, n/x)), if(5>m=min(m, r\n), return(0)); r=r%n*10); m==5; \\ Jinyuan Wang, Mar 27 2022
    
  • Python
    from itertools import count,islice
    from sympy import multiplicity,n_order
    def A352159_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            m2, m5 = multiplicity(2,n), multiplicity(5,n)
            k, m = 10**max(m2,m5), 10**(t := n_order(10,n//2**m2//5**m5))-1
            c = k//n
            s = str(m*k//n-c*m).zfill(t)
            if s == '0' and min(str(c)) == '5':
                yield n
            elif '0' not in s and min(str(c).lstrip('0')+s) == '5':
                    yield n
    A352159_list = list(islice(A352159_gen(),10)) # Chai Wah Wu, Mar 28 2022

Formula

A352153(a(n)) = 5.

Extensions

More terms from Jinyuan Wang, Mar 27 2022

A337855 Number of n-digit positive integers that are the product of two integers ending with 5.

Original entry on oeis.org

0, 2, 18, 180, 1800, 18000, 180000, 1800000, 18000000, 180000000, 1800000000, 18000000000, 180000000000, 1800000000000, 18000000000000, 180000000000000, 1800000000000000, 18000000000000000, 180000000000000000, 1800000000000000000, 18000000000000000000, 180000000000000000000
Offset: 1

Views

Author

Stefano Spezia, Sep 27 2020

Keywords

Comments

a(n) is the number of n-digit numbers in A053742.

Crossrefs

Cf. A011557 (powers of 10), A052268 (number of n-digit integers), A053742 (product of two integers ending with 5), A093136, A337856.

Programs

  • Mathematica
    LinearRecurrence[{10},{0,0,2,18},22]

Formula

O.g.f.: 2*(1 - x)*x^2/(1 - 10*x).
E.g.f.: (9*exp(10*x) - 9 - 90*x + 50*x^2)/500.
a(n) = 10*a(n-1) for n > 3 , with a(1) = 0, a(2) = 2 and a(3) = 18.
a(n) = 18*10^(n-3) for n > 2.
a(n) = 18*A011557(n - 3) for n > 2.
a(n) = 2*A052268(n - 2) for n > 2.
Sum_{i=2..n} a(n) = A093136(n - 1) for n > 1.
a(n) = 2*floor((k + 27*10^(n-2))/30), with 2 < k < 28. [This formula was found in the form k = 7 by Christian Krause's LODA miner] - Stefano Spezia, Dec 06 2021

A328780 Nonnegative integers k such that k and k^2 have the same number of nonzero digits.

Original entry on oeis.org

0, 1, 2, 3, 10, 20, 30, 100, 200, 245, 247, 249, 251, 253, 283, 300, 448, 548, 949, 1000, 1249, 1253, 1416, 1747, 1749, 1751, 1753, 1755, 2000, 2245, 2247, 2249, 2251, 2253, 2429, 2450, 2451, 2470, 2490, 2498, 2510, 2530, 2647, 2830, 3000, 3747, 3751, 4480, 4899
Offset: 1

Views

Author

Bernard Schott, Oct 27 2019

Keywords

Comments

The idea of this sequence comes from the 1st problem of the 28th British Mathematical Olympiad in 1992 (see the link).
This sequence is infinite because the family of integers {10^k, k >= 0} (A011557) belongs to this sequence.
The numbers m, m + 1, m + 2 where m = 49*10^k - 3, or m = 99*10^k - 3, k >= 3 are terms with all nonzero digits. - Marius A. Burtea, Dec 21 2020

Examples

			247^2 = 61009, hence 247 and 61009 both have 3 nonzero digits, 247 is a term.
		

References

  • A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Pb 1 pp. 57 and 109 (1992)

Crossrefs

Programs

  • Magma
    nz:=func; [k:k in [0..5000] | nz(k) eq nz(k^2)]; // Marius A. Burtea, Dec 21 2020
    
  • Maple
    q:= n->(f->f(n)=f(n^2))(t->nops(subs(0=[][], convert(t, base, 10)))):
    select(q, [$0..5000])[];  # Alois P. Heinz, Oct 27 2019
  • Mathematica
    Select[Range[0, 5000], Equal @@ Total /@ Sign@ IntegerDigits[{#, #^2}] &] (* Giovanni Resta, Feb 27 2020 *)
  • PARI
    isok(k) = hammingweight(digits(k)) == hammingweight(digits(k^2)); \\ Michel Marcus, Dec 22 2020

Extensions

More terms from Alois P. Heinz, Oct 27 2019

A093135 Expansion of g.f. (1-8*x)/((1-x)*(1-10*x)).

Original entry on oeis.org

1, 3, 23, 223, 2223, 22223, 222223, 2222223, 22222223, 222222223, 2222222223, 22222222223, 222222222223, 2222222222223, 22222222222223, 222222222222223, 2222222222222223, 22222222222222223, 222222222222222223, 2222222222222222223, 22222222222222222223, 222222222222222222223
Offset: 0

Views

Author

Paul Barry, Mar 24 2004

Keywords

Comments

Second binomial transform of 2*A001045(3*n)/3 + (-1)^n.
Partial sums of A093136.
A convex combination of 10^n and 1.
In general the second binomial transform of k*Jacobsthal(3*n)/3 + (-1)^n is 1, 1+k, 1+11*k, 1+111*k, ... This is the case for k=2.
Essentially the same as A091628 (cf. 2nd formula). - Georg Fischer, Oct 06 2018
a(n) is 3^n represented in bijective base-3 numeration. - Alois P. Heinz, Aug 26 2019

Crossrefs

Formula

a(n) = (2*10^n + 7)/9.
a(n) = 10*a(n-1) - 7 (with a(0)=1). - Vincenzo Librandi, Aug 02 2010
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(7 + 2*exp(9*x))/9.
a(n) = 11*a(n-1) - 10*a(n-2).
a(n) = (A062397(n) - A002279(n))/2. (End)

Extensions

More terms from Elmo R. Oliveira, Apr 03 2025

A351650 Integers m such that digsum(m) divides digsum(m^2) where digsum = sum of digits = A007953.

Original entry on oeis.org

1, 2, 3, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 24, 27, 30, 31, 33, 36, 42, 45, 46, 54, 55, 63, 72, 74, 81, 90, 92, 99, 100, 101, 102, 103, 108, 110, 111, 112, 113, 117, 120, 121, 122, 123, 126, 128, 130, 132, 135, 144, 145, 153, 162, 171, 180, 189, 190, 191, 198
Offset: 1

Views

Author

Bernard Schott, Feb 16 2022

Keywords

Comments

This is a generalization of a problem proposed by French site Diophante in link.
The smallest term k such that the corresponding quotient = n is A280012(n).
The quotient is 1 iff m is in A058369 \ {0}.
If k is in A061909, then digsum(k^2) = digsum(k)^2.
If k is a term, 10*k is also a term.
There are infinitely many m such that both m and m+1 are in the sequence, for example subsequence A002283 \ {0}.
Corresponding quotients are in A351651.

Examples

			digit sum of 42 = 4+2 = 6; then 42^2 = 1764, digit sum of 1764 = 1+7+6+4 = 18; as 6 divides 18, 42 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200], Divisible[Total[IntegerDigits[#^2]], Total[IntegerDigits[#]]] &] (* Amiram Eldar, Feb 16 2022 *)
  • PARI
    is(n)=sumdigits(n^2)%sumdigits(n) == 0 \\ David A. Corneth, Feb 16 2022
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n**2)%sd(n) == 0
    print([m for m in range(1, 200) if ok(m)]) # Michael S. Branicky, Feb 16 2022

Formula

A004159(a(n)) = A007953(a(n)) * A351651(n).

Extensions

More terms from David A. Corneth, Feb 16 2022

A375143 Numbers whose prime factorization has a minimum exponent that is larger than 1 and is 1 less than the maximum exponent.

Original entry on oeis.org

72, 108, 200, 392, 432, 500, 648, 675, 968, 1125, 1323, 1352, 1372, 1800, 2000, 2312, 2592, 2700, 2888, 3087, 3267, 3528, 3888, 4232, 4500, 4563, 5000, 5292, 5324, 5400, 5488, 6125, 6728, 7688, 7803, 8575, 8712, 8788, 9000, 9747, 9800, 10125, 10584, 10952, 11979
Offset: 1

Views

Author

Amiram Eldar, Aug 01 2024

Keywords

Comments

Numbers k such that 2 <= A051904(k) = A051903(k) - 1.
Numbers that are product of two coprime nonsquarefree powers of squarefree numbers (A072777) with consecutive exponents.

Examples

			72 = 2^3 * 3^2 is a term since A051904(72) = 2 is larger than 1 and is 1 less than A051903(72) = 3.
		

Crossrefs

Subsequence of A001694.
Subsequences: A143610, A167747 \ {1, 2, 12}, A093136 \ {1, 2, 20}, A179666, A179702, A190472, A375073.

Programs

  • Mathematica
    q[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, 2 <= Min[e] == Max[e] - 1]; Select[Range[12000], q]
  • PARI
    is(k) = {my(e = factor(k)[,2]); k > 1 && 2 <= vecmin(e) && vecmin(e) + 1 == vecmax(e);}

Formula

Sum_{n>=1} 1/a(n) = Sum_{k>=2} f(k) = 0.053695635500385312854..., where f(k) = Product_{p prime} (1 + 1/p^k + 1/p^(k+1)) - zeta(k)/zeta(2*k) - zeta(k+1)/zeta(2*k+2) + 1 is the sum of reciprocals of the subset of numbers m with A051904(m) = k.
Showing 1-10 of 11 results. Next