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 41-50 of 310 results. Next

A043283 Maximal run length in base-9 representation of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007095.
Cf. A043276-A043290 for base-2 to base-16 analogs.
Cf. A002452 (gives the positions of records, the first occurrence of each n).
Cf. also A044940.

Programs

  • Mathematica
    A043283[n_]:=Max[Map[Length,Split[IntegerDigits[n,9]]]];Array[A043283,100] (* Paolo Xausa, Sep 27 2023 *)
  • PARI
    A043283(n, b=9)={my(m, c=1); while(n>0, n%b==(n\=b)%b && c++ && next; m=max(m, c); c=1); m} \\ M. F. Hasler, Jul 23 2013

A073796 Replace 9^k with (-9)^k in base 9 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, -9, -8, -7, -6, -5, -4, -3, -2, -1, -18, -17, -16, -15, -14, -13, -12, -11, -10, -27, -26, -25, -24, -23, -22, -21, -20, -19, -36, -35, -34, -33, -32, -31, -30, -29, -28, -45, -44, -43, -42, -41, -40, -39, -38, -37, -54, -53, -52, -51, -50, -49, -48, -47, -46
Offset: 0

Views

Author

Robert G. Wilson v, Aug 12 2002

Keywords

Comments

Base 9 representation for n (in lexicographic order) converted from base -9 to base 10.

Crossrefs

Programs

  • Mathematica
    f[n_Integer, b_Integer] := Block[{l = IntegerDigits[n]}, Sum[l[[ -i]]*(-b)^(i - 1), {i, 1, Length[l]}]]; a = Table[ FromDigits[ IntegerDigits[n, 9]], {n, 0, 80}]; b = {}; Do[b = Append[b, f[a[[n]], 9]], {n, 1, 80}]; b

Formula

a(9*k+m) = -9*a(k)+m for 0 <= m < 9. - Chai Wah Wu, Jan 16 2020

A037385 Numbers k such that every base-3 digit of k is a base-9 digit of k.

Original entry on oeis.org

1, 2, 9, 13, 18, 26, 81, 82, 83, 84, 85, 90, 99, 108, 117, 121, 162, 163, 164, 168, 170, 171, 180, 216, 234, 242, 244, 252, 325, 333, 488, 504, 650, 666, 729, 730, 731, 732, 733, 738, 739, 740, 741, 742, 747, 748, 749, 750, 751
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037385 n = a037385_list !! (n-1)
    a037385_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 9 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    Select[Range[1000],SubsetQ[IntegerDigits[#,9],IntegerDigits[#,3]]&] (* Harvey P. Dale, Dec 19 2015 *)

A037396 Numbers k such that every base-5 digit of k is a base-9 digit of k.

Original entry on oeis.org

1, 2, 3, 4, 11, 22, 93, 121, 124, 126, 156, 181, 199, 317, 362, 598, 750, 751, 752, 755, 756, 758, 768, 770, 771, 775, 776, 780, 781, 785, 796, 812, 831, 841, 843, 849, 859, 895, 900, 906, 907, 911, 912, 918, 922, 927, 931, 932
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037396 n = a037396_list !! (n-1)
    a037396_list = filter f [1..] where
       f x = null $ nub (ds 5 x) \\ nub (ds 9 x)
       ds b x = if x > 0 then d : ds b x' else []  where (x', d) = divMod x b
    -- Reinhard Zumkeller, May 30 2013
    
  • PARI
    is(n)=#setminus(Set(digits(n,5)), Set(digits(n,9)))==0 \\ Charles R Greathouse IV, Feb 11 2017

A110607 Numbers n whose base 9 representations, interpreted as base 10 integers, are semiprimes.

Original entry on oeis.org

4, 6, 9, 13, 14, 19, 20, 23, 24, 30, 31, 32, 35, 42, 46, 50, 52, 53, 56, 59, 67, 70, 74, 77, 78, 79, 87, 91, 95, 98, 100, 101, 102, 111, 112, 118, 119, 120, 122, 123, 131, 134, 136, 141, 151, 152, 156, 158, 160, 163, 164, 165, 167, 168, 174, 175, 176, 178, 179, 181
Offset: 1

Views

Author

Jonathan Vos Post, Jul 30 2005

Keywords

Comments

A108873 is the equivalent using base 3. A110602 is the equivalent using base 4. A110603 is the equivalent using base 5. A110604 is the equivalent using base 6. A110605 is the equivalent using base 7. A110606 is the equivalent using base 8.

Examples

			a(1) = 4 because 4 (base 9) = 4 (base 10) = 2 * 2, a semiprime (A001358).
a(2) = 6 because 6 (base 9) = 6 (base 10) = 2 * 3.
a(3) = 9 because 9 (base 9) = 10 and 10 (base 10) = 2 * 5.
a(4) = 13 because 13 (base 9) = 14 and 14 (base 10) = 2 * 7.
a(5) = 14 because 14 (base 9) = 15 and 15 (base 10) = 3 * 5.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[181], Plus @@ Last /@ FactorInteger[FromDigits[IntegerDigits[ #, 9]]] == 2 &] (* Ray Chandler, Aug 05 2005 *)
    Select[Range[200],PrimeOmega[FromDigits[IntegerDigits[#,9]]]==2&] (* Harvey P. Dale, Dec 02 2018 *)

Extensions

Extended by Ray Chandler, Aug 05 2005

A262154 Pseudoprimes to base 9, written in base 9.

Original entry on oeis.org

4, 8, 31, 57, 111, 144, 247, 347, 444, 627, 651, 754, 825, 854, 861, 1261, 1264, 1371, 1457, 1681, 1811, 2102, 2331, 2531, 3338, 3378, 3581, 3631, 3757, 3774, 4011, 4161, 4445, 4551, 5127, 6002, 6321, 6722, 7311, 7547, 8651, 10044, 10101, 10637, 11111, 11762, 12464, 12831, 12885, 13141, 13201, 15461, 16084, 16451
Offset: 1

Views

Author

Abdul Gaffar Khan, Sep 13 2015

Keywords

Crossrefs

Cf. A007095 (numbers in base 9), A020138 (pseudoprimes to base 9).

Programs

  • Mathematica
    base = 9; t = {}; n = 1;
    While[Length[t] < 80, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 9]]]]; t
  • PARI
    lista(nn, b=9) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n,b), x), x, 10), ", ");););} \\ Michel Marcus, Sep 30 2015

Formula

a(n) = A007095(A020138(n)).

A293662 Base-9 circular primes that are not base-9 repunits.

Original entry on oeis.org

11, 13, 17, 19, 23, 37, 43, 47, 67, 71, 73, 79, 101, 149, 173, 181, 211, 233, 347, 421, 443, 613, 641, 647, 673, 719, 727, 971, 1123, 1361, 1429, 1609, 1697, 2153, 2179, 3371, 3547, 3833, 4019, 4091, 4099, 4229, 5227, 5261, 5281, 5683, 5689, 5741, 5749, 5821
Offset: 1

Views

Author

Felix Fröhlich, Dec 30 2017

Keywords

Comments

Conjecture: The sequence is finite.

Examples

			101 written in base 9 is 122. The base-9 numbers 122, 221, 212 written in base 10 are 101, 181, 173, respectively and all those numbers are prime, so 101, 173 and 181 are terms of the sequence.
		

Crossrefs

Cf. base-b nonrepunit circular primes: A293657 (b=4), A293658 (b=5), A293659 (b=6), A293660 (b=7), A293661 (b=8), A293663 (b=10).

Programs

  • Mathematica
    With[{b = 9}, Select[Prime@ Range[PrimePi@ b + 1, 10^3], Function[w, And[AllTrue[Array[FromDigits[RotateRight[w, #], b] &, Length@ w - 1], PrimeQ], Union@ w != {1} ]]@ IntegerDigits[#, b] &]] (* Michael De Vlieger, Dec 30 2017 *)
  • PARI
    rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v
    decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i])
    is_circularprime(p, base) = my(db=digits(p, base), r=rot(db), i=0); if(vecmin(db)==0, return(0), while(1, dec=decimal(r, base); if(!ispseudoprime(dec), return(0)); r=rot(r); if(r==db, return(1))))
    forprime(p=1, , if(vecmin(digits(p, 9))!=vecmax(digits(p, 9)), if(is_circularprime(p, 9), print1(p, ", "))))

A337536 Numbers k for which there are only 2 bases b (2 and k+1) where the digits of k contain the digit b-1.

Original entry on oeis.org

2, 3, 4, 10, 36, 40, 82, 256
Offset: 1

Views

Author

Michel Marcus, Aug 31 2020

Keywords

Comments

These could be called "nine-free numbers".
From David A. Corneth, Aug 31 2020: (Start)
This sequence has density 0. Conjecture: this sequence is finite and full. a(9) > 10^100 if it exists.
Suppose we want to see if 22792 = 1011021011_3 is a term. Since it has a digit of 2 in base 3, we can see that it is not. The next number that does not have the digit 2 in base 3 is 1011100000_3 = 22842, so we can proceed from there. In a similar way we can skip numbers based on bases b > 3. (End)
All terms of this sequence increased by 1 (except a(2)=3) are prime. - François Marques, Aug 31 2020
From Devansh Singh, Sep 19 2020: (Start)
If n is one less than an odd prime and we are interested in bases 3 <= b <= n-1 such that n in base b contains the digit b-1, then divisor of b (except 1) -1 cannot be the last digit since divisor of b divides n+1, which is not possible as n+1 is an odd prime.
If the last digit is 1, then b is odd as 1 = 2-1 and 2 cannot divide b as n+1 is an odd prime.
If the last digit is 0, then b-1 is the last digit of n-1 in base b.
b <= n/2 for even n,b <= (n+1)/2 for odd n.
This sequence is equivalent to the existence of only one prime generating polynomial = F(x) (having positive integer coefficients >=0 and <=b-1 for F(b)) such that F(2) = p.
There is no other prime generating polynomial = G(x) (having positive integer coefficients >=0 and <= b-1 for G(b)) that generates p for 2 < x = b <= (p-1)/2.
(End)

Examples

			2 is a term because 2 = 10_2 = 2_3, so both have the digit b-1, and there are no other bases where this happens.
4 is a term because 4 = 100_2 = 4_5, so both have the digit b-1, and there are no other bases where this happens.
		

Crossrefs

Programs

  • PARI
    isok(n, b) = vecmax(digits(n, b)) == b-1;
    b(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b; \\ A337535
    is(n) = b(n) == n+1;
    
  • PARI
    \\ See Corneth link \\ David A. Corneth, Aug 31 2020

A353117 Base-9 representation of A000422(n).

Original entry on oeis.org

1, 23, 386, 5831, 82456, 1206503, 15355671, 202838110, 2484401020, 31322180131, 3835578242783, 525732558043736, 70648887825106821, 10365384555277543376, 1340704717754261643863, 173544168713353406577421
Offset: 1

Views

Author

Seiichi Manyama, Apr 24 2022

Keywords

Crossrefs

Programs

  • Ruby
    def A(k, n)
      (1..n).map{|i| (1..i).to_a.reverse.join.to_i.to_s(k).to_i}
    end
    p A(9, 20)

Formula

a(n) = A007095(A000422(n)).

A004053 For m=2,3,..., write m in bases 2,3,..,m.

Original entry on oeis.org

10, 11, 10, 100, 11, 10, 101, 12, 11, 10, 110, 20, 12, 11, 10, 111, 21, 13, 12, 11, 10, 1000, 22, 20, 13, 12, 11, 10, 1001, 100, 21, 14, 13, 12, 11, 10, 1010, 101, 22, 20, 14, 13, 12, 11, 10, 1011, 102, 23, 21, 15, 14, 13, 12, 11, 10, 1100, 110, 30, 22, 20, 15, 14, 13, 12, 11, 10
Offset: 2

Views

Author

Johan Boye (johbo(AT)ida.liu.se)

Keywords

Examples

			Triangle begins:
    10;
    11,  10;
   100,  11, 10;
   101,  12, 11, 10;
   110,  20, 12, 11, 10;
   111,  21, 13, 12, 11, 10;
  1000,  22, 20, 13, 12, 11, 10;
  1001, 100, 21, 14, 13, 12, 11, 10;
  ...
		

Crossrefs

Programs

  • Mathematica
    FromDigits/@Flatten[Table[IntegerDigits[m,b],{m,2,20},{b,2,m}],1] (* Harvey P. Dale, Dec 01 2024 *)
  • PARI
    T(n, k) = fromdigits(digits(n, k), 10);
    tabl(nn) = for (n=2, nn, for (b=2, n, print1(T(n, b), ", "))); \\ Michel Marcus, Aug 30 2019
Previous Showing 41-50 of 310 results. Next