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 11-20 of 36 results. Next

A355622 a(n) is the n-digit positive number with no trailing zeros and coprime to its digital reversal R(a(n)) at which abs(a(n)/R(a(n))-Pi) is minimized.

Original entry on oeis.org

1, 92, 581, 5471, 52861, 998713, 7774742, 93630892, 422334431, 9190135292, 45425395441, 472539314051, 5784475521481, 49371008251751, 939253175379892, 9265811239939492, 52949745472445861, 952186420153090303, 9836241210282790313, 36386277546811128511, 442327789252803797041
Offset: 1

Views

Author

Stefano Spezia, Jul 10 2022

Keywords

Comments

a(n) and R(a(n)) have the same number of digits.
Petr Beckmann wrote that the fraction 92/29, corresponding to the second term of the sequence, appeared as value of Pi in a document written in A.D. 718.

Examples

			n              fraction    approximated value
-   -------------------    ------------------
1                     1    1
2                 92/29    3.1724137931034...
3               581/185    3.1405405405405...
4             5471/1745    3.1352435530086...
5           52861/16825    3.1418127786033...
6         998713/317899    3.1416047235128...
7       7774742/2474777    3.1415929596889...
8     93630892/29803639    3.1415926088757...
9   422334431/134433224    3.1415926690860...
...
		

References

  • Petr Beckmann, A History of Pi, 3rd Ed., Boulder, Colorado: The Golem Press (1974): p. 27.

Crossrefs

Cf. A355623 (denominator or digital reversal).

Programs

  • Mathematica
    nmax=9; a={}; For[n=1, n<=nmax, n++, minim=Infinity; For[k=10^(n-1), k<=10^n-1, k++, If[(dist=Abs[k/FromDigits[Reverse[IntegerDigits[k]]]-Pi]) < minim && Last[IntegerDigits[k]]!=0 && GCD[k,FromDigits[Reverse[IntegerDigits[k]]]]==1, minim=dist; kmin=k]]; AppendTo[a, kmin]]; a

Extensions

a(10)-a(19) from Bert Dobbelaere, Jul 17 2022
a(20)-a(21) from Bert Dobbelaere, Sep 05 2022

A355623 a(n) is the n-digit positive number with no trailing zeros and coprime to its digital reversal R(a(n)) at which abs(R(a(n))/a(n)-Pi) is minimized.

Original entry on oeis.org

1, 29, 185, 1745, 16825, 317899, 2474777, 29803639, 134433224, 2925310919, 14459352454, 150413935274, 1841255744875, 15715280017394, 298973571352939, 2949399321185629, 16854427454794925, 303090351024681259, 3130972820121426389, 11582111864577268363, 140797308252987723244
Offset: 1

Views

Author

Stefano Spezia, Jul 10 2022

Keywords

Comments

a(n) and R(a(n)) have the same number of digits.
Petr Beckmann wrote that the fraction 92/29, corresponding to the second term of the sequence, appeared as value of Pi in a document written in A.D. 718.

Examples

			n              fraction    approximated value
-   -------------------    ------------------
1                     1    1
2                 92/29    3.1724137931034...
3               581/185    3.1405405405405...
4             5471/1745    3.1352435530086...
5           52861/16825    3.1418127786033...
6         998713/317899    3.1416047235128...
7       7774742/2474777    3.1415929596889...
8     93630892/29803639    3.1415926088757...
9   422334431/134433224    3.1415926690860...
...
		

References

  • Petr Beckmann, A History of Pi, 3rd Ed., Boulder, Colorado: The Golem Press (1974): p. 27.

Crossrefs

Cf. A355622 (numerator or digital reversal).

Programs

  • Mathematica
    nmax=9; a={}; For[n=1, n<=nmax, n++, minim=Infinity; For[k=10^(n-1), k<=10^n-1, k++, If[(dist=Abs[FromDigits[Reverse[IntegerDigits[k]]]/k-Pi]) < minim && Last[IntegerDigits[k]]!=0 && GCD[k,FromDigits[Reverse[IntegerDigits[k]]]]==1, minim=dist; kmin=k]]; AppendTo[a, kmin]]; a

Extensions

a(10)-a(19) from Bert Dobbelaere, Jul 17 2022
a(20)-a(21) from Bert Dobbelaere, Sep 05 2022

A209931 Numbers k such that smallest digit of all divisors of k is 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 111
Offset: 1

Views

Author

Jaroslav Krizek, Mar 20 2012

Keywords

Comments

Also numbers k such that smallest digit of concatenation of all divisors of k (A037278 or A176558) is 1.
Sequence is not the same as A052382, first deviation is at a(173): A052382(173) = 212, a(173) = 213. [Corrected by Michael S. Branicky, Jul 01 2025.]
Sequence is not the same as A067251, first deviation is at a(91): A067251 (91) = 101, a(91) = 111.
Complement of A209932.

Examples

			Number 24 is in sequence because smallest digit of all divisors of 24 (1, 2, 4, 8, 3, 6, 12, 24) is 1.
		

Crossrefs

Cf. A052382, A067251, A209929 (smallest digit of all divisors of n).

Programs

  • Maple
    isA209931 := proc(n)
        digsdiv := {} ;
        for d in numtheory[divisors](n) do
            dgs := convert(convert(d,base,10),set) ;
            digsdiv := digsdiv union dgs ;
        end do:
        if 0 in digsdiv then
            false;
        else
            true ;
        end if;
    end proc:
    A209931 := proc(n)
        option remember;
        if n =1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA209931(a) then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(A209931(n),n=1..120) ;# R. J. Mathar, Dec 28 2023
  • Mathematica
    Select[Range[100], Min[IntegerDigits[Divisors[#]]] == 1 &] (* Paolo Xausa, Jul 03 2025 *)
  • Python
    from sympy import divisors
    def ok(n): return all('0' not in str(d) for d in divisors(n, generator=True))
    print([k for k in range(1, 112) if ok(k)]) # Michael S. Branicky, Jul 01 2025

A217562 Even numbers not divisible by 5.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38, 42, 44, 46, 48, 52, 54, 56, 58, 62, 64, 66, 68, 72, 74, 76, 78, 82, 84, 86, 88, 92, 94, 96, 98, 102, 104, 106, 108, 112, 114, 116, 118, 122, 124, 126, 128, 132
Offset: 1

Views

Author

Jeremy Gardiner, Oct 06 2012

Keywords

Comments

Numbers ending with 2,4,6,8 in base 10.
No term is divisible by 10 therefore a subsequence of A067251 (Numbers with no trailing zeros in decimal representation).
Union of this sequence with A005408 (The odd numbers) gives A067251.
Union of this sequence with A045572 (Numbers that are odd but not divisible by 5) gives A047201.
The even numbers divisible by 5 are A008592 (Multiples of 10).

Crossrefs

Programs

  • BASIC
    for n=1 to 199
    if n mod 5 <> 0 and n mod 2 <> 1 then print str$(n)+", ";
    next n
    print
    
  • Magma
    I:=[2, 4, 6, 8, 12]; [n le 5 select I[n] else Self(n-1) + Self(n-4) - Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 28 2012
    
  • Mathematica
    CoefficientList[Series[2*(1 + x + x^2 + x^3 + x^4)/((1 + x)*(1 + x^2)*(x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 28 2012 *)
  • PARI
    A217562(n)=(n-1)*5\2+2 \\ M. F. Hasler, Oct 07 2012
    
  • Python
    def A217562(n): return (5*n-1>>1)&-2 # Chai Wah Wu, Apr 21 2025

Formula

a(n) = 2*A047201(n).
G.f.: 2*x*(1+x+x^2+x^3+x^4) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Oct 06 2012
a(n) = 2*(n+floor((n-1)/4)). - Aaron J Grech, Sep 28 2024
E.g.f.: (4 - cos(x) + (5*x - 3)*cosh(x) + sin(x) + (5*x - 2)*sinh(x))/2. - Stefano Spezia, Sep 28 2024

A122484 Numbers k not ending in zero such that the sum of digits of k is >= the sum of digits of k^4 (in base 10).

Original entry on oeis.org

1, 7, 19, 67, 124499, 594959999, 1349969999, 57999659949, 84936699999, 498998999999
Offset: 1

Views

Author

Martin Raab, Sep 15 2006

Keywords

Comments

I've also found 498998999999, 7494994999999, 34999974999999 and some larger numbers, but not all values in between have been checked.
One is likely to find an example of the form 5*10^j - m*10^floor(j/2) - 1 or 7.5*10^j - m*10^floor(j/2) - 1 for j > 12 within the first 10^(floor(j/2)-1) m's.
Is this sequence finite? - Charles R Greathouse IV, Jan 12 2012
This sequence is infinite: for N = 7.5*10^j - 40*10^floor(j/2) - 1 one has A007953(N) = 9j-2 and A007953(N^4) <= 9j-2 for all j > 16, with equality for all even j > 16. - M. F. Hasler, Jan 14 2012
a(11) > 10^12. - Delbert L. Johnson, May 01 2023

Examples

			67 is a term because 67 has a digital sum of 13 and 67^4 = 20151121 which also has a digital sum of 13.
594959999 has a digital sum of 68 and 594959999^4 has a digital sum of 67, i.e., less than 68.
		

Crossrefs

Cf. A064210.

Programs

Formula

A122484 = { k in A067251 | A007953(k) >= A007953(k^4) }. - M. F. Hasler, Jan 14 2012

Extensions

a(8) and a(9) from Martin Raab, Oct 17 2008
a(10) from Delbert L. Johnson, May 01 2023

A178158 Numbers n that are divisible by every suffix of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 21, 22, 24, 25, 31, 32, 33, 35, 36, 41, 42, 44, 45, 48, 51, 52, 55, 61, 62, 63, 64, 65, 66, 71, 72, 75, 77, 81, 82, 84, 85, 88, 91, 92, 93, 95, 96, 99, 101, 102, 104, 105, 125, 201, 202, 204, 205, 208, 225, 301, 302, 303, 304, 305, 306, 312, 315, 325, 375, 401, 402, 404, 405, 408, 425, 501, 502, 504, 505, 525, 601, 602, 603, 604
Offset: 1

Views

Author

Michel Lagneau, Dec 17 2010

Keywords

Comments

If n = y*10^d+z is in the sequence, where 1<=y<=9 and z < 10^d, then z | y*10^d. - Robert Israel, Oct 17 2018

Examples

			9375 is in the sequence because :
.     5 | 9375 ;
.    75 | 9375 ;
.   375 | 9375 ;
.  9375 | 9375 .
		

Crossrefs

Cf. A034709 .
Cf. A067251.

Programs

  • Haskell
    import Data.List (tails)
    a178158 n = a178158_list !! (n-1)
    a178158_list = filter (\suff -> all ((== 0) . (mod suff))
       (map read $ tail $ init $ tails $ show suff :: [Integer])) a067251_list
    -- Reinhard Zumkeller, Mar 26 2012
  • Maple
    with(numtheory):T:=array(1..5):for n from 1 to 10000 do:ind:=0:l:=length(n):n0:=n:s:=0:for m from 0 to l-1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v : s:=s + u*10 ^m:if irem(n,10)<>0 and irem(n, s)=0 then ind:=ind+1:else fi:od:if ind=l then printf(`%d,`, n):else fi:od:
    # Alternative:
    filter:= proc(x)
      if x mod 10 = 0 then return false fi;
      andmap(t -> type(x/(x mod 10^t),integer), [$1..ilog10(x)])
    end proc:
    Res:= $1..9:
    for d from 1 to 6 do
      for y from 1 to 9 do
        for z in sort(convert(select(`<`,numtheory:-divisors(y*10^d),10^d),list)) do
          if filter(y*10^d+z) then
             Res:= Res, y*10^d+z;
          fi
    od od od:
    Res; # Robert Israel, Oct 17 2018

A255430 Natural numbers n, not multiples of 10, such that n and n^2 lack the digit 1 in their decimal expansions.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 22, 23, 24, 25, 26, 27, 28, 45, 47, 48, 52, 53, 55, 57, 58, 62, 63, 64, 65, 66, 67, 68, 73, 74, 75, 76, 77, 78, 82, 83, 84, 85, 86, 87, 88, 92, 93, 94, 95, 97, 98, 202, 205, 206, 207, 208, 222, 223, 225, 232, 233, 234, 235, 236, 238, 242, 243, 244, 245, 252, 253, 255
Offset: 1

Views

Author

Zak Seidov, Feb 23 2015

Keywords

Comments

No trailing zeros allowed.

Crossrefs

A342950 7-smooth numbers not divisible by 10: positive numbers whose prime divisors are all <= 7 but do not contain both 2 and 5.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14, 15, 16, 18, 21, 24, 25, 27, 28, 32, 35, 36, 42, 45, 48, 49, 54, 56, 63, 64, 72, 75, 81, 84, 96, 98, 105, 108, 112, 125, 126, 128, 135, 144, 147, 162, 168, 175, 189, 192, 196, 216, 224, 225, 243, 245, 252, 256, 288, 294, 315, 324
Offset: 1

Views

Author

David A. Corneth, Mar 30 2021

Keywords

Examples

			12 is in the sequence as all of its prime divisors are <= 7 and 12 is not divisible by 10.
		

Crossrefs

Union of A108319 and A108347.
Intersection of A002473 and A067251.

Programs

  • Mathematica
    Select[Range@500,Max[First/@FactorInteger@#]<=7&&Mod[#,10]!=0&] (* Giorgos Kalogeropoulos, Mar 30 2021 *)
  • PARI
    is(n) = if(n%10 == 0, return(0)); forprime(p = 2, 7, n/=p^valuation(n, p)); n==1
    
  • Python
    A342950_list, n = [], 1
    while n < 10**9:
        if n % 10:
            m = n
            for p in (2,3,5,7):
                q, r = divmod(m,p)
                while r == 0:
                    m = q
                    q, r = divmod(m,p)
            if m == 1:
                A342950_list.append(n)
        n += 1 # Chai Wah Wu, Mar 31 2021
    
  • Python
    from sympy import integer_log
    def A342950(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            for i in range(integer_log(x,7)[0]+1):
                for j in range(integer_log(m:=x//7**i,3)[0]+1):
                    c -= (k:=m//3**j).bit_length()+integer_log(k,5)[0]
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 17 2024
    
  • Python
    # faster for initial segment of sequence
    import heapq
    from itertools import islice
    def A342950gen(): # generator of terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5, 7]
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                    if not (p==2 and v%5==0) and not (p==5 and v&1==0):
                        heapq.heappush(h, v*p)
    print(list(islice(A342950gen(), 65))) # Michael S. Branicky, Sep 17 2024

Formula

Sum_{n>=1} 1/a(n) = 63/16. - Amiram Eldar, Apr 01 2021

A344748 Numbers m with decimal expansion (d_k, ..., d_1) such that d_i = m * i mod 10 for i = 1..k.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 26, 42, 47, 63, 68, 84, 89, 147, 284, 321, 468, 505, 642, 789, 826, 963, 2468, 2963, 4321, 4826, 6284, 6789, 8147, 8642, 50505, 52963, 54321, 56789, 58147, 208642, 258147, 406284, 456789, 604826, 654321, 802468, 852963
Offset: 1

Views

Author

Rémy Sigrist, May 28 2021

Keywords

Comments

Positive terms have no trailing zero in decimal representation (A067251), and are uniquely determined by their final digit d (A010879) and the number of digits, say k, in their decimal expansion (A055642); d*k cannot be a multiple of 10.
If m belongs to the sequence, then A217657(m) also belongs to the sequence.

Examples

			- 6 * 1 = 6 mod 10,
- 6 * 2 = 2 mod 10,
- 6 * 3 = 8 mod 10,
- 6 * 4 = 4 mod 10,
- so 4826 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    is(n) = { my (r=n); for (k=1, oo, if (r==0, return (1), (n*k)%10!=r%10, return (0), r\=10)) }
    
  • PARI
    print (setbinop((d,k) -> sum(i=1, k, 10^(i-1) * ((d*i)%10)), [1..9], [0..6]))
    
  • Python
    def ok(m):
      d = str(m)
      return all(d[-i] == str((m*i)%10) for i in range(1, len(d)+1))
    print(list(filter(ok, range(10**6)))) # Michael S. Branicky, May 29 2021
    
  • Python
    def auptod(maxdigits):
      alst = [0]
      for k in range(1, maxdigits+1):
        aklst = []
        for d1 in range(1, 10):
          d = [(d1*i)%10 for i in range(k, 0, -1)]
          if d[0] != 0: aklst.append(int("".join(map(str, d))))
        alst.extend(sorted(aklst))
      return alst
    print(auptod(6)) # Michael S. Branicky, May 29 2021

A346942 Numbers whose square starts and ends with exactly 4 identical digits.

Original entry on oeis.org

235700, 258200, 333400, 471400, 577400, 666700, 816500, 881900, 942800, 1054200, 1054300, 1054400, 1054500, 1490700, 1490800, 1490900, 1825700, 1825800, 1825900, 2108100, 2108200, 2108300, 2357100, 2581900, 2788800, 2788900, 2981300, 2981400, 3162200, 3333200, 3333300
Offset: 1

Views

Author

Bernard Schott, Aug 08 2021

Keywords

Comments

Terms are equal to 100 times the primitive terms of A346940, those that have no trailing zero in decimal representation, hence all terms end with exactly 00.

Examples

			258200 is a term because 258200^2 = 66667240000 starts with four 6's and ends with four 0's.
3334700 is not a term because 3334700^2 = 1111155560000 starts with five 1's (and ends with four 0's).
		

Crossrefs

Numbers whose square '....' with exactly k identical digits:
---------------------------------------------------------------------------
| k \'....'| starts | ends | starts and ends |
---------------------------------------------------------------------------
| k = 2 | A346812 | A346678 | A346774 |
| k = 3 | A346891 | A039685 | A346892 |
| k = 4 | A346940 | 100*A067251 | this sequence |
---------------------------------------------------------------------------
Cf. A346926.

Programs

  • Mathematica
    q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]] && SameQ @@ d[[-4 ;; -1]] && d[[-5]] != d[[-1]]; Select[Range[10000, 3333300], q] (* Amiram Eldar, Aug 08 2021 *)
  • Python
    def ok(n):
      s = str(n*n)
      return len(s) > 4 and s[0] == s[1] == s[2] == s[3] != s[4] and s[-1] == s[-2] == s[-3] == s[-4] != s[-5]
    print(list(filter(ok, range(3333333)))) # Michael S. Branicky, Aug 08 2021
    
  • Python
    A346942_list = [100*n for n in range(99,10**6) if n % 10 and (lambda x:x[0]==x[1]==x[2]==x[3]!=x[4])(str(n**2))] # Chai Wah Wu, Oct 02 2021
Previous Showing 11-20 of 36 results. Next