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 51-60 of 321 results. Next

A058186 Numbers (written in base 5) which appear the same when written in base 5 and base 10/2.

Original entry on oeis.org

0, 1, 2, 3, 4, 20, 21, 22, 23, 24, 40, 41, 42, 43, 44, 200, 201, 202, 203, 204, 220, 221, 222, 223, 224, 240, 241, 242, 243, 244, 400, 401, 402, 403, 404, 420, 421, 422, 423, 424, 440, 441, 442, 443, 444, 2000, 2001, 2002, 2003, 2004, 2020, 2021, 2022, 2023
Offset: 1

Views

Author

Henry Bottomley, Nov 17 2000

Keywords

Comments

To represent a number in base b, if a digit exceeds b-1, subtract b and carry 1. In fractional base b/c, subtract b and carry c. The sequence consists of numbers which in base 5 have digits in {0,2,4} except that the unit digit can be any from {0,1,2,3,4}.

Examples

			20 (10 in decimal) is a term since it is written as 20 both in base 5 and base 10/2.
30 (15 in decimal) is not a term since it is written as 30 in base 5 and 25 in base 10/2.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := s[n] = If[n == 0, 0, 10*s[2*Floor[n/10]] + Mod[n, 10]]; f[n_] := FromDigits[IntegerDigits[n, 5]]; q[k_] := s[k] == f[k]; f /@ Select[Range[0, 300], q] (* Amiram Eldar, Aug 02 2025 *)
  • PARI
    s(n) = if(n == 0, 0, 10 * s(n\10 * 2) + n % 10);
    f(n) = fromdigits(digits(n, 5));
    list(lim) = apply(f, select(x -> s(x) == f(x), vector(lim+1, i, i-1))); \\ Amiram Eldar, Aug 02 2025

Formula

a(n) = A007091(A058185(n)). - Amiram Eldar, Aug 02 2025

Extensions

Offset corrected by Amiram Eldar, Aug 02 2025

A067044 Smallest positive k such that k*n contains only even digits.

Original entry on oeis.org

2, 1, 2, 1, 4, 1, 4, 1, 32, 2, 2, 2, 2, 2, 4, 3, 4, 16, 12, 1, 2, 1, 2, 1, 8, 1, 18, 1, 14, 2, 2, 2, 2, 2, 8, 8, 6, 6, 12, 1, 2, 1, 2, 1, 64, 1, 6, 1, 14, 4, 4, 4, 8, 9, 4, 4, 4, 7, 14, 1, 4, 1, 14, 1, 4, 1, 4, 1, 12, 4, 4, 4, 28, 3, 8, 3, 6, 6, 34, 1, 6, 1, 8, 1, 8, 1, 24, 1, 32, 32, 22, 5, 22, 3
Offset: 1

Views

Author

Amarnath Murthy, Dec 29 2001

Keywords

Comments

No multiple of 10 can appear in this sequence. - M. F. Hasler, Mar 07 2025

Examples

			a(7) = 4 as among the multiples of 7 (i.e., 7, 14, 21, 28...), 28 is the smallest multiple with only even digits and a(7)= 28/7 = 4.
a(16) = 3 is the first odd term > 1, a(n = 54, 58, 74, 76, 92, 94, 96, 98, ...) are the next examples, cf. A380874. - _M. F. Hasler_, Mar 03 2025
		

Crossrefs

Cf. A014263 (numbers with only even digits), A007091 (numbers in base 5).

Programs

  • Mathematica
    Table[k = n; While[Length[Intersection[{1, 3, 5, 7, 9}, IntegerDigits[k]]] > 0, k = k + n]; k/n, {n, 100}] (* T. D. Noe, Jun 03 2013 *)
    sk[n_]:=Module[{k=1},While[!AllTrue[IntegerDigits[k*n],EvenQ],k++];k]; Array[sk,100] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 27 2015 *)
  • PARI
    apply( {A067044(n, f=1+n%2)=forstep(a=f*n, oo, f*n, digits(a)%2||return(a/n))}, [1..99]) \\ M. F. Hasler, Mar 03 2025
    
  • Python
    A067044 = lambda n: next(k for k in range(1+n%2, 9<<99, 1+n%2)if not any(int(d)&1 for d in str(n*k))) # M. F. Hasler, Mar 03 2025

Formula

From M. F. Hasler, Mar 07 2025: (Start)
There is an explicit formula for many values of n:
a(n) = 1 if n has only even digits <=> n is in A014263, else:
a(n) = 2 if n has only digits < 5 <=> n is in A007091;
a(m*(10^k-1)) = 8*round(10^k/6)^2/m for m = 1, 2, 4 or 8 and any k > 0;
a(5*(10^k-1)) = 16*round(10^k/6)^2 for any k > 0;
a(50*m + {5 or 15}) = 4 if m has all digits < 5. (End)

Extensions

More terms from Eli McGowan (ejmcgowa(AT)mail.lakeheadu.ca), May 06 2002
Data corrected by Paul Tek, Jun 03 2013

A072806 Primes of the form 6k+5 written in base 5.

Original entry on oeis.org

10, 21, 32, 43, 104, 131, 142, 203, 214, 241, 313, 324, 401, 412, 423, 1011, 1022, 1044, 1132, 1143, 1204, 1231, 1242, 1402, 1413, 1424, 2001, 2012, 2023, 2034, 2111, 2133, 2221, 2232, 2342, 2403, 2414, 3013, 3024, 3101, 3134, 3211, 3233, 3244, 3321
Offset: 1

Views

Author

Labos Elemer, Jul 12 2002

Keywords

Examples

			41 = 25 + 3*5 + 1 = 131_5.
		

Crossrefs

Programs

  • Mathematica
    Do[s=Prime[n]; If[Mod[s, 6]==5, Print[BaseForm[s, 5]]], {n, 1, 256}]
    FromDigits[IntegerDigits[#, 5]] & /@  Select[Table[6 n + 5, {n, 0, 100}], PrimeQ] (* Harvey P. Dale, Oct 05 2023 *)
  • PARI
    lista(nn) = for (n=0, nn, if (isprime(p=6*n+5), print1(fromdigits(digits(p, 5)), ", "))); \\ Michel Marcus, Jul 09 2018

Formula

a(n) = A007091(A007528(n)). - Michel Marcus, Jul 09 2018

A158082 Squares whose decimal expansion contains no digit greater than 4.

Original entry on oeis.org

0, 1, 4, 100, 121, 144, 324, 400, 441, 1024, 1444, 2304, 2401, 10000, 10201, 10404, 12100, 12321, 14400, 22201, 23104, 32041, 32400, 33124, 40000, 40401, 44100, 101124, 102400, 103041, 110224, 114244, 121104, 123201, 130321, 131044, 144400, 203401, 204304, 213444
Offset: 1

Views

Author

N. J. A. Sloane, May 23 2010

Keywords

Crossrefs

Cf. A158304.
Intersection of A000290 and A007091.

Programs

  • Mathematica
    Select[Range[0, 1000]^2, Max[IntegerDigits[#]] <= 4 &] (* Paolo Xausa, Apr 29 2024 *)

A255590 Convert n to base 5, move the least significant digit to the most significant one and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 11, 16, 21, 2, 7, 12, 17, 22, 3, 8, 13, 18, 23, 4, 9, 14, 19, 24, 5, 30, 55, 80, 105, 6, 31, 56, 81, 106, 7, 32, 57, 82, 107, 8, 33, 58, 83, 108, 9, 34, 59, 84, 109, 10, 35, 60, 85, 110, 11, 36, 61, 86, 111, 12, 37, 62, 87, 112, 13, 38, 63, 88
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(5*n) = n.
a(5^n) = 5^(n-1).
Fixed points of the transform are listed in A048330.

Examples

			14 in base 5 is 24: moving the least significant digit to the most significant one we have 42 that is 22 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,5);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 5; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 68]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateRight[IntegerDigits[n,5]],5],{n,0,100}] (* Harvey P. Dale, Jun 11 2025 *)
  • Python
    def A255590(n):
        x=str(A007091(n))
        return int(x[-1]+x[:-1], 5) # Indranil Ghosh, Feb 03 2017

A331565 The base 10 numbers with a digit product > 0 and which when written in bases 3,4,5,6,7,8,9 have two or more other base representations with the same digit product.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 91, 491, 921, 1138, 1234, 4853, 13581, 23568, 29242, 42161, 42162, 42163, 42164, 42991, 43365, 44313, 83342, 83651, 85226, 114382, 153881, 155462, 159422, 232868, 291862, 296183, 352486, 372642, 398543, 419563, 441194, 465326, 616146, 625431, 625523, 635813
Offset: 1

Views

Author

Scott R. Shannon, Jan 20 2020

Keywords

Comments

For terms 10 < a(n) < 10^9 none have a base-3 representation whose digit product equals the base-10 product. The first such entry using the base-4 representation is 491.

Examples

			6 is a term as 6_10 = 6_7 = 6_8 = 6_9, so it has three other base representations where the digit product also equals 6.
91 is a term as 91_10 = 331_5 = 133_8, so it has two other base representations where the digit product also equals 9.
491 is a term as 491_10 = 13223_4 = 3431_5, so it has two other base representations where the digit product also equals 36.
		

Crossrefs

Subsequence of A052382 (zeroless numbers).

Programs

  • Mathematica
    proDig[n_, b_] := Times @@ IntegerDigits[n, b]; seqQ[n_] := Module[{prod = proDig[n, 10], count = 0}, If[prod > 0, Do[If[proDig[n, b] == prod, count++]; If[count == 2, Break[]], {b, 3, 9}]]; count == 2]; Select[Range[650000], seqQ] (* Amiram Eldar, Jan 21 2020 *)
  • PARI
    isok(n) = {my(p=vecprod(digits(n))); (p != 0) && (sum(k=3, 9, p==vecprod(digits(n,k))) >= 2);} \\ Michel Marcus, Jan 21 2020

A339255 Leading digit of n in base 5.

Original entry on oeis.org

1, 2, 3, 4, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Kevin Ryde, Nov 28 2020

Keywords

Crossrefs

Cf. A007091 (base 5), A073851 (partial sums).

Programs

  • Mathematica
    IntegerDigits[#,5][[1]]&/@Range[100] (* Harvey P. Dale, Sep 04 2021 *)
  • PARI
    a(n) = n\5^logint(n,5);

Formula

a(n) = floor(n / 5^floor(log_5(n))).
G.f.: (x + Sum_{k>=0} Sum_{d=2..4} (x^(d*5^k)-x^(5^(k+1))) )/(1-x).

A031950 Numbers with exactly two distinct base-5 digits.

Original entry on oeis.org

5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 30, 32, 33, 34, 36, 37, 41, 43, 46, 49, 50, 52, 56, 57, 60, 61, 63, 64, 67, 68, 72, 74, 75, 78, 81, 83, 87, 88, 90, 91, 92, 94, 98, 99, 100, 104, 106, 109, 112, 114, 118, 119
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007091.

Programs

  • Mathematica
    Select[Range[150],Length[Union[IntegerDigits[#,5]]]==2&]  (* Harvey P. Dale, Apr 13 2011 *)

A032542 Integer part of decimal 'base-5 looking' numbers divided by their actual base-5 values.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1998

Keywords

Crossrefs

Cf. A032543, A032544. See also A032532 for explanation.

Formula

a(n) = floor(A007091(n)/n). - Sean A. Irvine, Jun 22 2020

Extensions

Offset and data corrected by Sean A. Irvine, Jun 22 2020

A032829 Numbers whose set of base-5 digits is {3,4}.

Original entry on oeis.org

3, 4, 18, 19, 23, 24, 93, 94, 98, 99, 118, 119, 123, 124, 468, 469, 473, 474, 493, 494, 498, 499, 593, 594, 598, 599, 618, 619, 623, 624, 2343, 2344, 2348, 2349, 2368, 2369, 2373, 2374, 2468, 2469, 2473, 2474, 2493, 2494, 2498
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007091.

Programs

  • Magma
    [n: n in [1..2800] | Set(IntegerToSequence(n, 5)) subset {3, 4}];// Vincenzo Librandi, May 29 2012
    
  • Mathematica
    Flatten[Table[FromDigits[#,5]&/@Tuples[{3,4},n],{n,5}]] (* Vincenzo Librandi, May 29 2012 *)
  • Maxima
    a[1]:3$ a[2]:4$ a[n]:= if oddp(n) then 5*a[floor(n/2)]+3 else 5*a[floor((n-1)/2)]+4$ makelist(a[n],n,1,45); /* Bruno Berselli, May 30 2012 */

Formula

a(1)=3, a(2)=4; a(n) = 5*a(floor(n/2))+3 for n odd, otherwise a(n) = 5*a(floor((n-1)/2))+4. - Bruno Berselli, May 30 2012
Previous Showing 51-60 of 321 results. Next