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

A169967 Numbers whose decimal expansion contains only 0's and 4's.

Original entry on oeis.org

0, 4, 40, 44, 400, 404, 440, 444, 4000, 4004, 4040, 4044, 4400, 4404, 4440, 4444, 40000, 40004, 40040, 40044, 40400, 40404, 40440, 40444, 44000, 44004, 44040, 44044, 44400, 44404, 44440, 44444, 400000, 400004, 400040, 400044, 400400, 400404, 400440, 400444
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2010

Keywords

Crossrefs

Programs

  • Haskell
    a169967 n = a169967_list !! (n-1)
    a169967_list = map (* 4) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    FromDigits/@Tuples[{0,4},6] (* Harvey P. Dale, Dec 21 2018 *)
  • 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*4)))) \\ Charles R Greathouse IV, Nov 16 2011
    

Formula

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

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

Original entry on oeis.org

4, 5, 16, 36, 40, 44, 45, 50, 108, 160, 216, 252, 288, 292, 308, 360, 364, 375, 396, 400, 404, 440, 444, 450, 500, 1024, 1080, 1375, 1600, 2072, 2160, 2368, 2520, 2880, 2920, 3080, 3125, 3375, 3600, 3640, 3750, 3848, 3960, 4000, 4040, 4125, 4224, 4368, 4400, 4440, 4500, 5000
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.

Examples

			m = 16 is a term since 1/16 = 0.0625 and the smallest term after the leading 0 is 2.
m = 216 is a term since 1/216 = 0.004629629629... and the smallest term after the leading 0's is 2.
m = 4444 is not a term since 1/4444 = 0.00022502250225... and the smallest term after the leading 0's is 0.
		

Crossrefs

Cf. A341383.
Subsequences: A093141 \ {1}, A093143 \ {1}.
Similar with smallest digit k: A352154 (k=0), A352155 (k=1), this sequence (k=2), A352157 (k=3), A352158 (k=4), A352159 (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@# == 2 &]
  • Python
    from itertools import count, islice
    from sympy import multiplicity, n_order
    def A352156_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)) == '2':
                yield n
            elif '0' not in s and min(str(c).lstrip('0')+s) == '2':
                    yield n
    A352156_list = list(islice(A352156_gen(),20)) # Chai Wah Wu, Mar 28 2022

Formula

A352153(a(n)) = 2.

A337816 Numbers that can be written as (m * sum of digits of m) for some m.

Original entry on oeis.org

0, 1, 4, 9, 10, 16, 22, 25, 36, 40, 49, 52, 63, 64, 70, 81, 88, 90, 100, 112, 115, 124, 136, 144, 160, 162, 175, 190, 198, 202, 205, 208, 220, 238, 243, 250, 252, 280, 301, 306, 319, 324, 333, 352, 360, 364, 370, 400, 405, 412, 418, 424, 427, 448, 460, 468, 484, 486, 490
Offset: 1

Views

Author

Bernard Schott, Sep 23 2020

Keywords

Comments

If 3 divides a(n), then 9 divides a(n).

Examples

			10 = 10 * (1+0);
22 = 11 * (1+1).
		

Crossrefs

Range of A057147 and of A117570.
Similar sequences: A176995 (m + sum of digits of m), A336826 (m * product of digits of m), A337718 (m + product of digits of m).
Cf. A337817.
Some subsequences: A011557, A052268, A093141.

Programs

  • Mathematica
    m = 500; Select[Union @ Table[k * Plus @@ IntegerDigits[k], {k, 0, m}], # <= m &] (* Amiram Eldar, Sep 23 2020 *)
  • PARI
    is(k)={if(k==0, return(1)); fordiv(k, d, if(d*sumdigits(d)==k, return(1))); 0} \\ Andrew Howroyd, Sep 23 2020

A093140 Expansion of (1-6*x)/((1-x)*(1-10*x)).

Original entry on oeis.org

1, 5, 45, 445, 4445, 44445, 444445, 4444445, 44444445, 444444445, 4444444445, 44444444445, 444444444445, 4444444444445, 44444444444445, 444444444444445, 4444444444444445, 44444444444444445, 444444444444444445, 4444444444444444445, 44444444444444444445, 444444444444444444445
Offset: 0

Views

Author

Paul Barry, Mar 24 2004

Keywords

Comments

Second binomial transform of 4*A001045(3n)/3+(-1)^n. Partial sums of A093141. A convex combination of 10^n and 1. In general the second binomial transform of k*Jacobsthal(3n)/3+(-1)^n is 1, 1+k, 1+11k, 1+111k, ... This is the case for k=4.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1-6x)/((1-x)(1-10x)),{x,0,30}],x] (* or *) LinearRecurrence[{11,-10},{1,5},30] (* or *) Join[{1},Table[FromDigits[PadLeft[{5},n,4]],{n,30}]] (* Harvey P. Dale, Dec 17 2022 *)

Formula

G.f.: (1-6*x)/((1-x)*(1-10*x)).
a(n) = 4*10^n/9 + 5/9.
a(n+1) = (A102807(n+1)-A002477(n))/((Sum_{i=1..n} 2*10^i) + 3). [Roger L. Bagula, May 22 2010]
a(n) = 10*a(n-1)-5 with a(0)=1. - Vincenzo Librandi, Aug 02 2010
a(n) = 11*a(n-1)-10*a(n-2). - Wesley Ivan Hurt, May 20 2021
E.g.f.: exp(x)*(4*exp(9*x) + 5)/9. - Elmo R. Oliveira, Aug 17 2024

Extensions

a(19)-a(22) from Elmo R. Oliveira, Aug 17 2024

A346178 Expansion of (1-2*x)/(1-10*x).

Original entry on oeis.org

1, 8, 80, 800, 8000, 80000, 800000, 8000000, 80000000, 800000000, 8000000000, 80000000000, 800000000000, 8000000000000, 80000000000000, 800000000000000, 8000000000000000, 80000000000000000, 800000000000000000, 8000000000000000000, 80000000000000000000
Offset: 0

Views

Author

Felix Fröhlich, Jul 09 2021

Keywords

Crossrefs

Cf. expansion of (1-k*x)/(1-10*x) A011557 (k=0), A196662 (k=3), A090019 (k=4), A093143 (k=5), A093141 (k=6), A093138 (k=7), A093136 (k=8).

Programs

  • PARI
    Vec((1-2*x)/(1-10*x) + O(x^20))

Formula

a(n) = 8*10^(n-1), n>0.
E.g.f.: (1 + 4*exp(10*x))/5. - Stefano Spezia, Jul 09 2021
Showing 1-5 of 5 results.