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 191 results. Next

A030588 Write odd numbers in base 6 and juxtapose.

Original entry on oeis.org

1, 3, 5, 1, 1, 1, 3, 1, 5, 2, 1, 2, 3, 2, 5, 3, 1, 3, 3, 3, 5, 4, 1, 4, 3, 4, 5, 5, 1, 5, 3, 5, 5, 1, 0, 1, 1, 0, 3, 1, 0, 5, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 2, 1, 1, 2, 3, 1, 2, 5, 1, 3, 1, 1, 3, 3, 1, 3, 5, 1, 4, 1, 1, 4, 3, 1, 4, 5, 1, 5, 1, 1, 5, 3, 1, 5, 5, 2, 0, 1
Offset: 1

Views

Author

Keywords

Examples

			From _Antti Karttunen_, Dec 26 2018: (Start)
The first twelve odd numbers and their base-6 representations (A007092) are:
    1    1
    3    3
    5    5
    7   11
    9   13
   11   15
   13   21
   15   23
   17   25
   19   31
   21   33
   23   35
thus the sequence begins with terms 1, 3, 5, 1, 1, 1, 3, 1, 5, 2, 1, 2, 3, 2, 5, 3, 1, 3, 3, 3, 5.
(End)
		

Crossrefs

Programs

A202267 Numbers in which all digits are noncomposites (1, 2, 3, 5, 7) or 0.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 10, 11, 12, 13, 15, 17, 20, 21, 22, 23, 25, 27, 30, 31, 32, 33, 35, 37, 50, 51, 52, 53, 55, 57, 70, 71, 72, 73, 75, 77, 100, 101, 102, 103, 105, 107, 110, 111, 112, 113, 115, 117, 120, 121, 122, 123, 125, 127, 130, 131, 132, 133, 135, 137, 150
Offset: 1

Views

Author

Jaroslav Krizek, Dec 25 2011

Keywords

Comments

If n-1 is represented as a base-6 number (see A007092) according to n-1=d(m)d(m-1)...d(3)d(2)d(1)d(0) then a(n)= sum_{j=0..m} c(d(j))*10^j, where c(k)=0,1,2,3,5,7 for k=0..5. - Hieronymus Fischer, May 30 2012

Examples

			a(1000) = 5353.
a(10^4) = 115153
a(10^5) = 2070753.
a(10^6) = 33233353.
		

Crossrefs

Supersequence of A001742 and A046034.
Cf. A046034 (numbers in which all digits are primes), A001742 (numbers in which all digits are noncomposites excluding 0), A202268 (numbers in which all digits are nonprimes excluding 0), A084984 (numbers in which all digits are nonprimes), A029581 (numbers in which all digits are composites).

Programs

  • Mathematica
    Union[Flatten[FromDigits/@Tuples[{0,1,2,3,5,7},3]]] (* Harvey P. Dale, Mar 11 2015 *)

Formula

From Hieronymus Fischer, May 30 2012: (Start)
a(n) = (b_m(n)+1) mod 10 + floor((b_m(n)+2)/5) + floor((b_m(n)+1)/5) - 2*floor(b_m(n)/5))*10^m + sum_{j=0..m-1} (b_j(n) mod 6 + floor((b_j(n)+1)/6) + floor((b_j(n)+2)/6) - 2*floor(b_j(n)/6)))*10^j, where n>1, b_j(n)) = floor((n-1-6^m)/6^j), m = floor(log_6(n-1)).
a(1*6^n+1) = 1*10^n.
a(2*6^n+1) = 2*10^n.
a(3*6^n+1) = 3*10^n.
a(4*6^n+1) = 5*10^n.
a(5*6^n+1) = 7*10^n.
a(n) = 10^log_6(n-1) for n=6^k+1, k>0,
a(n) < 10^log_6(n-1) else.
a(n) = A007092(n-1) iff the digits of A007092(n-1) are <= 3, a(n)>A007092(n-1), else.
a(n) <= A084984(n), equality holds if the representation of n-1 as a base-6 number only has digits 0 or 1.
G.f.: g(x) = (x/(1-x))*sum_{j>=0} 10^j*x^6^j *(1-x^6^j)* (1 + 2x^6^j + 3(x^2)^6^j + 5(x^3)^6^j + 7(x^4)^6^j)/(1-x^6^(j+1)).
Also: g(x) = (x/(1-x))*(h_(6,1)(x) + h_(6,2)(x) + h_(6,3)(x) + 2*h_(6,4)(x) + 2*h_(6,5)(x) - 7*h_(6,6)(x)), where h_(6,k)(x) = sum_{j>=0} 10^j*x^(k*6^j)/(1-x^6^(j+1)). (End)
Sum_{n>=2} 1/a(n) = 4.945325883472729555972742252181522711968119529132581193614012706741310832798... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024

Extensions

Examples added by Hieronymus Fischer, May 30 2012

A029990 Numbers k such that k^2 is palindromic in base 6.

Original entry on oeis.org

0, 1, 2, 7, 37, 43, 76, 91, 217, 259, 1064, 1297, 1333, 1519, 1555, 2704, 3367, 7777, 8029, 9079, 19747, 46657, 46873, 47989, 48205, 54439, 54655, 54695, 83979, 118027, 241304, 279937, 281449, 287749, 326599, 707707, 1679617
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007092.
Numbers k such that k^2 is palindromic in base b: A003166 (b=2), A029984 (b=3), A029986 (b=4), A029988 (b=5), this sequence (b=6), A029992 (b=7), A029805 (b=8), A029994 (b=9), A002778 (b=10), A029996 (b=11), A029737 (b=12), A029998 (b=13), A030072 (b=14), A030073 (b=15), A029733 (b=16), A118651 (b=17).

Programs

  • Mathematica
    palindromicQ[n_, b_:10] := TrueQ[IntegerDigits[n, b] == Reverse[IntegerDigits[n, b]]]; Select[Range[1000], palindromicQ[#^2, 6] &] (* Alonso del Arte, Mar 05 2017 *)
  • PARI
    ispal(n,base)=my(d=digits(n,base)); d==Vecrev(d)
    is(n)==ispal(n^2,6) \\ Charles R Greathouse IV, Mar 09 2017

A073787 Numbers in base -6.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 150, 151, 152, 153, 154, 155, 140, 141, 142, 143, 144, 145, 130, 131, 132, 133, 134, 135, 120, 121, 122, 123, 124, 125, 110, 111, 112, 113, 114, 115, 100, 101, 102, 103, 104, 105, 250, 251, 252, 253, 254, 255, 240, 241, 242, 243, 244, 245
Offset: 0

Views

Author

Robert G. Wilson v, Aug 11 2002

Keywords

References

  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1969, Vol. 2, p. 189.

Crossrefs

Programs

  • Mathematica
    ToNegaBases[i_Integer, b_Integer] := FromDigits[ Rest[ Reverse[ Mod[ NestWhileList[(#1 - Mod[ #1, b])/-b &, i, #1 != 0 &], b]]]]; Table[ ToNegaBases[n, 6], {n, 0, 60}]
  • Python
    def A073787(n):
        s, q = '', n
        while q >= 6 or q < 0:
            q, r = divmod(q, -6)
            if r < 0:
                q += 1
                r += 6
            s += str(r)
        return int(str(q)+s[::-1]) # Chai Wah Wu, Apr 09 2016

A248910 Numbers with no zeros in base-6 representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2015

Keywords

Comments

Different from A039215, A047253, A184522, A187390, A194386.

Crossrefs

Cf. A007092, A100969 (subsequence).
Zeroless numbers in some other bases <= 10: A000042 (base 2), A032924 (base 3), A023705 (base 4), A255805 (base 8), A255808 (base 9), A052382 (base 10).

Programs

  • Haskell
    a248910 n = a248910_list !! (n-1)
    a248910_list = iterate f 1 where
       f x = 1 + if r < 5 then x else 6 * f x'  where (x', r) = divMod x 6
    
  • Mathematica
    Select[Range[100], DigitCount[#,6, 0] == 0 &] (* Paolo Xausa, Jun 29 2025 *)
  • PARI
    isok(m) = vecmin(digits(m, 6)) > 0; \\ Michel Marcus, Jan 23 2022
    
  • Python
    from sympy import integer_log
    def A248910(n):
        m = integer_log(k:=(n<<2)+1,5)[0]
        return sum((1+(k-5**m)//(5**j<<2)%5)*6**j for j in range(m)) # Chai Wah Wu, Jun 28 2025

A346690 Replace 6^k with (-1)^k in base-6 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, -1, 0, 1, 2, 3, 4, -2, -1, 0, 1, 2, 3, -3, -2, -1, 0, 1, 2, -4, -3, -2, -1, 0, 1, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, -1, 0, 1, 2, 3, 4, -2, -1, 0, 1, 2, 3, -3, -2, -1, 0, 1, 2, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, -1, 0, 1, 2, 3, 4, -2, -1, 0, 1, 2, 3, -3, -2, -1
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 29 2021

Keywords

Comments

If n has base-6 expansion abc..xyz with least significant digit z, a(n) = z - y + x - w + ...

Examples

			59 = 135_6, 5 - 3 + 1 = 3, so a(59) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; (n mod 6) - procname(floor(n/6)) end proc:
    f(0):= 0:
    map(f, [$1..100]); # Robert Israel, Nov 21 2022
  • Mathematica
    nmax = 104; A[] = 0; Do[A[x] = x (1 + 2 x + 3 x^2 + 4 x^3 + 5 x^4)/(1 - x^6) - (1 + x + x^2 + x^3 + x^4 + x^5) A[x^6] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    Table[n + 7 Sum[(-1)^k Floor[n/6^k], {k, 1, Floor[Log[6, n]]}], {n, 0, 104}]
  • PARI
    a(n) = subst(Pol(digits(n, 6)), 'x, -1); \\ Michel Marcus, Nov 22 2022
  • Python
    from sympy.ntheory.digits import digits
    def a(n):
        return sum(bi*(-1)**k for k, bi in enumerate(digits(n, 6)[1:][::-1]))
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 29 2021
    

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4) / (1 - x^6) - (1 + x + x^2 + x^3 + x^4 + x^5) * A(x^6).
a(n) = n + 7 * Sum_{k>=1} (-1)^k * floor(n/6^k).
a(6*n+j) = j - a(n) for 0 <= j <= 5. - Robert Israel, Nov 21 2022

A073793 Replace 6^k with (-6)^k in base 6 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, -6, -5, -4, -3, -2, -1, -12, -11, -10, -9, -8, -7, -18, -17, -16, -15, -14, -13, -24, -23, -22, -21, -20, -19, -30, -29, -28, -27, -26, -25, 36, 37, 38, 39, 40, 41, 30, 31, 32, 33, 34, 35, 24, 25, 26, 27, 28, 29, 18, 19, 20, 21, 22, 23, 12, 13, 14, 15, 16, 17, 6, 7, 8, 9, 10, 11
Offset: 0

Views

Author

Robert G. Wilson v, Aug 12 2002

Keywords

Comments

Base 6 representation for n converted from base -6 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, 6]], {n, 0, 80}]; b = {}; Do[b = Append[b, f[a[[n]], 6]], {n, 1, 80}]; b

Formula

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

A037382 Numbers k such that every base-3 digit of k is a base-6 digit of k.

Original entry on oeis.org

1, 2, 8, 13, 26, 36, 37, 38, 39, 40, 44, 48, 49, 50, 52, 53, 68, 72, 73, 74, 78, 79, 80, 109, 121, 152, 157, 182, 218, 224, 228, 229, 230, 231, 232, 233, 236, 242, 243, 244, 246, 247, 248, 252, 253, 254, 255, 256, 264, 270, 282, 288
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), nub)
    a037382 n = a037382_list !! (n-1)
    a037382_list = filter f [1..] where
       f x = null $ nub (ds 3 x) \\ nub (ds 6 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[300],SubsetQ[IntegerDigits[#,6],IntegerDigits[#,3]]&] (* Harvey P. Dale, Jun 05 2015 *)

A262103 Pseudoprimes to base 6, written in base 6.

Original entry on oeis.org

55, 505, 1001, 1221, 2121, 5041, 5051, 5501, 10101, 12001, 15225, 20301, 21021, 23501, 24301, 24341, 30041, 31031, 32451, 42241, 50125, 50321, 101101, 102421, 105131, 111111, 113425, 121001, 121101, 123041, 123321, 132305, 150135, 152021, 201201, 204445, 212121, 221001, 222401, 232401
Offset: 1

Views

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A007092 (numbers in base 6), A005937 (pseudoprimes to base 6).

Programs

  • Mathematica
    base = 6; t = {}; n = 1;
    While[Length[t] < 40, n++;
    If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
      AppendTo[t, FromDigits@IntegerDigits[n, 6]]]]; t
  • PARI
    lista(nn, b=6) = {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) = A007092(A005937(n)).

A293659 Base-6 circular primes that are not base-6 repunits.

Original entry on oeis.org

11, 31, 71, 191, 211
Offset: 1

Views

Author

Felix Fröhlich, Oct 28 2017

Keywords

Comments

Conjecture: The sequence is finite, with 211 being the last term (see A293142).
Written in base 6 (A007092), the terms are 15, 51, 155, 515, 551. - Antti Karttunen, Nov 26 2017
From Michael De Vlieger, Dec 30 2017: (Start)
This sequence may be particularly constrained to few terms since only {1, 5} are coprime to 6, and any senary circular prime involves just these 2 senary digits. This is because all primes aside from {2, 3} are congruent to {1, 5} (mod 6). Since a senary number consisting of all 5's is divisible by 5 and since we have disqualified prime repunits, the sequence is probably finite.
a(6), if it exists, must be larger than 6^21 = 21936950640377856. (End)

Examples

			71 written in base 6 is 155. The base-6 numbers 155, 515, 551 written in base 10 are 71, 191, 211, respectively and all those numbers are prime, so 71, 191 and 211 are terms of the sequence.
		

Crossrefs

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

Programs

  • Mathematica
    With[{b = 6}, Select[Prime@ Range[PrimePi@ b + 1, 10^6], Function[w, And[AllTrue[Array[FromDigits[RotateRight[w, #], b] &, Length@ w - 1], PrimeQ], Union@ w != {1} ]]@ IntegerDigits[#, b] &]] (* or *)
    With[{b = 6}, Select[Flatten@ Array[FromDigits[#, 6] & /@ Most@ Rest@ Tuples[{1, 5}, #] &, 18, 2], Function[w, And[ AllTrue[ Array[ FromDigits[ RotateRight[w, #], b] &, Length@ w], 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, 6))!=vecmax(digits(p, 6)), if(is_circularprime(p, 6), print1(p, ", "))))
Previous Showing 11-20 of 191 results. Next