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 31-40 of 41 results. Next

A363428 Squares whose base-3 expansion has no 0.

Original entry on oeis.org

1, 4, 16, 25, 49, 121, 400, 484, 1444, 1849, 3364, 5476, 10201, 10609, 10816, 12769, 17161, 19321, 19600, 155236, 169744, 274576, 286225, 344569, 346921, 450241, 502681, 863041, 885481, 984064, 1042441, 4008004, 4190209, 4596736, 7203856, 7263025, 7706176, 12752041, 14326225, 14341369, 23833924
Offset: 1

Views

Author

Robert Israel, Jun 01 2023

Keywords

Examples

			a(5) = 49 is a term because 49 = 7^2 = 1121_3.
		

Crossrefs

Intersection of A000290 and A032924. Cf. A363408.

Programs

  • Maple
    R1:= {1};
    S1:= {1,2};
    for i from 1 to 15 do
      S1:= map(t -> (3*t+1, 3*t+2), S1);
      R1:= R1 union select(issqr,S1);
    od:
    Rl;
  • Mathematica
    Select[Range[5000]^2, ! MemberQ[IntegerDigits[#, 3], 0] &] (* Amiram Eldar, Jun 01 2023 *)
  • Python
    from itertools import islice, count
    from gmpy2 import digits
    def A363428_gen(): # generator of terms
        return filter(lambda n:'0' not in digits(n,3), (n**2 for n in count(0)))
    A363428_list = list(islice(A363428_gen(),20)) # Chai Wah Wu, Jun 17 2023

A365279 Inverse permutation to A365278.

Original entry on oeis.org

0, 1, 3, 2, 7, 15, 6, 31, 63, 4, 5, 11, 14, 127, 255, 30, 511, 1023, 12, 13, 27, 62, 2047, 4095, 126, 8191, 16383, 8, 9, 19, 10, 23, 47, 22, 95, 191, 28, 29, 59, 254, 32767, 65535, 510, 131071, 262143, 60, 61, 123, 1022, 524287, 1048575, 2046, 2097151, 4194303
Offset: 0

Views

Author

Rémy Sigrist, Aug 31 2023

Keywords

Examples

			A365278(42) = 273, hence a(273) = 42.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(3*n) = 2*a(n).
a(A032924(k)) = 2^k - 1 for any k > 0.
A023416(a(n)) = A077267(n).

A382412 Numbers with no zeros in their base-7 representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Paolo Xausa, Mar 24 2025

Keywords

Crossrefs

Cf. zeroless numbers in other bases: A126646 (base 2), A032924 (base 3), A023705 (base 4), A023721 (base 5), A248910 (base 6), A255805 (base 8), A255808 (base 9), A052382 (base 10).
Cf. A007093, A043393, A249102, A382413 (complement).

Programs

  • Mathematica
    Select[Range[100], DigitCount[#, 7, 0] == 0 &]

A259566 Numbers following gaps in the sequence of base-3 numbers that don't contain 0.

Original entry on oeis.org

1, 4, 7, 13, 16, 22, 25, 40, 43, 49, 52, 67, 70, 76, 79, 121, 124, 130, 133, 148, 151, 157, 160, 202, 205, 211, 214, 229, 232, 238, 241, 364, 367, 373, 376, 391, 394, 400, 403, 445, 448, 454, 457, 472, 475, 481, 484, 607, 610, 616, 619, 634, 637, 643, 646, 688, 691, 697, 700, 715, 718, 724, 727, 1093, 1096, 1102, 1105, 1120
Offset: 1

Views

Author

Sean Oneil, Jun 30 2015

Keywords

Comments

Partial sums for the convergent modified harmonic series in base 3 excluding 0 = Sum of 1/a(n) + 1/(a(n) + 1) = Sum of (2*a(n) + 1)/(a(n)*(a(n) + 1)).

Examples

			Pattern of numbers of skipped terms (numbers in base 3 with at least one zero) is 1 (3 = 10_3), 1 (6 = 20_3), 3+1 (9 = 100_3, 10 = 101_3, 11 = 102_3, 12 = 110_3), 1, 3+1, 1, 9+3+1, 1, 3+1, 1, 9+3+1, 1, 3+1, 1, 27+9+3+1, ...
		

Crossrefs

Cf. A032924.
Subset of A016777 (congruent to 1 mod 3).
Each term is one more than each number that follows a gap in A081605.

Programs

  • PARI
    lista(nn)=prec0 = 1; for(n=1, nn, if (vecmin(digits(n, 3)), if (prec0, print1(n,, ", ")); prec0 = 0, prec0 = 1);); \\ Michel Marcus, Aug 03 2015
    
  • Python
    def A259566(n): return int(bin(m:=n)[3:],3)*3 + (3**m.bit_length()-1>>1) if n>1 else 1 # Chai Wah Wu, Oct 13 2023

Formula

a(n) = A032924(2n - 1).

A266001 Numbers with no 0's in their base 3 and base 4 expansions.

Original entry on oeis.org

1, 2, 5, 7, 13, 14, 22, 23, 25, 26, 41, 43, 53, 121, 122, 125, 149, 151, 157, 158, 214, 215, 229, 230, 233, 238, 239, 365, 367, 373, 374, 377, 445, 446, 473, 475, 485, 607, 617, 619, 634, 635, 637, 638, 697, 698, 701, 725, 727, 1366, 1367, 1373, 1375, 1429, 1430, 1445, 1447, 1453, 1454
Offset: 1

Views

Author

Robin Powell, Jan 27 2016

Keywords

Comments

Intersection of A023705 and A032924.
1, 7 and 32767 also share this property in base 2.

Examples

			53 is 1222 in base 3 and 311 in base 4; no zeros are shown in either representation and so 53 is a term.
Similarly, 121 is 11111 in base 3 and 1321 in base 4 so it is also a term.
		

Crossrefs

Programs

  • PARI
    isokd(n) = vecmin(digits(n, 3)) && vecmin(digits(n, 4)); \\ Michel Marcus, Jan 28 2016
    
  • Python
    from _future_ import division
    from gmpy2 import digits
    A266001_list = [j for j in (int(format(i,'b'),3)+(3**n-1)//2 for n in range(1,10) for i in range(2**n)) if '0' not in digits(j,4)] # Chai Wah Wu, Feb 13 2016

A337296 Number whose sum and product of ternary representation digits are equal.

Original entry on oeis.org

0, 1, 2, 8, 134, 152, 158, 160, 206, 212, 214, 230, 232, 238, 265760, 265814, 265832, 265838, 265840, 265976, 265994, 266000, 266002, 266048, 266054, 266056, 266072, 266074, 266080, 266462, 266480, 266486, 266488, 266534, 266540, 266542, 266558, 266560, 266566
Offset: 1

Views

Author

Amiram Eldar, Aug 21 2020

Keywords

Comments

In ternary representation all the terms except 0 are zeroless (A032924).
If k is the number of digits 2 of a term, then the number of digits 1 is 2^k - 2*k, and the total number of digits is thus 2^k - k (A000325).
The total number of terms with k digits 2, for k = 1, 2, ..., is binomial(2^k-k,k) = 1, 1, 10, 495, 80730, 40475358, ...

Examples

			8 is a term since in base 3 the representation of 8 is 22 and 2 + 2 = 2 * 2.
		

Crossrefs

The ternary version of A034710.

Programs

  • Mathematica
    Select[Range[0, 266566], Times @@ (d = IntegerDigits[#, 3]) == Plus @@ d &]
    (* or *)
    f[k_] := FromDigits[#, 3] & /@ Permutations[Join[Table[1, {2^k - 2*k}], Table[2, k]]]; Flatten@ Join[{0}, Table[f[k], {k, 0, 4}]] (* Amiram Eldar, Oct 16 2023 *)
  • PARI
    isok(m) = my(d=digits(m,3)); vecsum(d) == vecprod(d); \\ Michel Marcus, Aug 22 2020

A348706 Delete all 0's from ternary expansion of n.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 7, 8, 1, 4, 5, 4, 13, 14, 5, 16, 17, 2, 7, 8, 7, 22, 23, 8, 25, 26, 1, 4, 5, 4, 13, 14, 5, 16, 17, 4, 13, 14, 13, 40, 41, 14, 43, 44, 5, 16, 17, 16, 49, 50, 17, 52, 53, 2, 7, 8, 7, 22, 23, 8, 25, 26, 7, 22, 23, 22, 67, 68, 23, 70, 71, 8, 25
Offset: 1

Views

Author

Rémy Sigrist, Oct 30 2021

Keywords

Examples

			The first terms, in decimal and in base 3, are:
  n   a(n)  ter(n)  ter(a(n))
  --  ----  ------  ---------
   1     1       1          1
   2     2       2          2
   3     1      10          1
   4     4      11         11
   5     5      12         12
   6     2      20          2
   7     7      21         21
   8     8      22         22
   9     1     100          1
  10     4     101         11
  11     5     102         12
  12     4     110         11
  13    13     111        111
  14    14     112        112
  15     5     120         12
		

Crossrefs

Cf. A004719 (decimal analog), A032924 (fixed points), A038573 (binary analog).

Programs

  • Mathematica
    a[n_] := FromDigits[DeleteCases[IntegerDigits[n, 3], 0], 3]; Array[a, 100] (* Amiram Eldar, Oct 31 2021 *)
  • PARI
    a(n, base=3) = fromdigits(select(sign, digits(n, base)), base)
    
  • Python
    from gmpy2 import digits
    def A348706(n): return int(digits(n,3).replace('0',''),3) # Chai Wah Wu, Nov 02 2021

Formula

a(n) <= n with equality iff n belongs to A032924.

A363995 Rectangular array by descending antidiagonals: row n consists of the numbers k such that n = 1 + maximal runlength of 0's in the ternary representation of k.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 5, 10, 18, 27, 7, 11, 28, 54, 81, 8, 12, 29, 82, 162, 243, 13, 15, 36, 83, 244, 486, 729, 14, 19, 45, 108, 245, 730, 1458, 2187, 16, 20, 55, 135, 324, 731, 2188, 4374, 6561, 17, 21, 56, 163, 405, 972, 2189, 6562, 13122, 19683, 22, 24, 63
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2023

Keywords

Comments

Every positive integer occurs exactly once.

Examples

			Corner:
    1     2      4     5     7      8     13     14     16     17
    3     6     10    11    12     15     19     20     21     24
    9    18     28    29    36     45     55     56     63     72
   27    54     82    83   108    135    163    164    189    216
   81   162    244   245   324    405    487    488    567    648
  243   486    730   731   972   1215   1459   1460   1701   1944
Let r(n) = maximal runlength of 0s in the ternary representation of n, for n >=1, so that (r(n)) = (0,0,1,0,0,1,0,0,2,...). Thus, r(9)=2, so that the first term in row 3 of the array is 9.
		

Crossrefs

Cf. A000244 (column 1), A032924 (row 1), A363996.

Programs

  • Mathematica
    d[n_] := d[n] = First[RealDigits[n, 3]]; f[w_] := FromDigits[w, 3];
    s = Map[Split, Table[d[n], {n, 1, 2187}]];
    x[n_] := Select[s, MemberQ[#, Table[0, n]] &];
    u[n_] := Map[Flatten, x[n]];
    t0 = Flatten[Table[FromDigits[#, 3] & /@ Tuples[{1, 2}, n], {n, 5}]];
    t = Join[{t0}, Table[Map[f, u[n]], {n, 1, 7}]] ;
    TableForm[t]  (* this sequence as an array *)
    Table[t[[n - k + 1, k]], {n, 8}, {k, n, 1, -1}] // Flatten (* this sequence *)
    (* Next, another program *)
    nwCornerD[lists_] := Quiet[Flatten[Reap[NestWhile[# + 1 &, 1, ! {} ===
    Sow[Check[lists[[# - Binomial[Floor[1/2 + Sqrt[2*#]], 2]]][[1 - # +
    Binomial[Floor[3/2 + Sqrt[2*#]], 2]]], {}]] &[#] &]][[2]]]];
    z = 10; radix = 3;
    tmp = Map[Max[Map[Count[#, 0] &, #]] &,
       Map[Split, IntegerDigits[Range[radix^z], radix]]];
    nwCornerD[Map[Flatten[Position[tmp, #]] &, Range[0, z]]]
    (* Peter J. C. Moses, Aug 01 2023 *)

A363996 Rectangular array by descending antidiagonals: row n consists of the numbers k such that n = 1 + maximal runlength of 1's in the ternary representation of k.

Original entry on oeis.org

2, 6, 1, 8, 3, 4, 18, 5, 12, 13, 20, 7, 14, 39, 40, 24, 9, 22, 41, 120, 121, 26, 10, 31, 67, 122, 363, 364, 54, 11, 36, 94, 202, 365, 1092, 1093, 56, 15, 37, 117, 283, 607, 1094, 3279, 3280, 60, 16, 38, 118, 360, 850, 1822, 3281, 9840, 9841, 62, 17, 42, 119
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2023

Keywords

Comments

Every positive integer occurs exactly once.

Examples

			Corner:
    2     6     8    18    20    24     26
    1     3     5     7     9    10     11
    4    12    14    22    31    36     37
   13    39    41    67    94   117    118
   40   120   122   202   283   360    361
  121   363   365   607   850   1089  1090
Let r(n) = maximal runlength of 1's in the ternary representation of n, for n >= 1, so that (r(n)) = (1,0,1,2,1,0,1,0,1,...). Thus, r(4)=2, so the first term in row 3 of the array is 4.
		

Crossrefs

Cf. A000244 (column 1), A032924 (row 1), A363995.

Programs

  • Mathematica
    d[n_] := d[n] = First[RealDigits[n, 3]]; f[w_] := FromDigits[w, 3];
    s = Map[Split, Table[d[n], {n, 1, 50000}]];
    x[n_] := Select[s, MemberQ[#, Table[1, n]] &];
    u[n_] := Map[Flatten, x[n]];
    t0 = Select[Range[1, 4000], DigitCount[#, 3, 1] == 0 &, 20];
    v = Table[Take[Map[f, u[n]], Min[{20, Length[u[n]]}]], {n, 1, 11}]
    t = Join[{t0}, v]
    TableForm[t]  (* this sequence as an array *)
    Table[t[[n - k + 1, k]], {n, 11}, {k, n, 1, -1}] // Flatten (* this sequence *)

A371222 Product of digits of (n written in base 3) mod 3.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Mar 18 2024

Keywords

Comments

a(A032924(n)) = 1 or 2. For n >= 1, a(A032924(n)) - 1 = A309953(A032924(n)) mod 3 - 1 = A010059(n+1).

Examples

			n = 5: 5_10 = 12_3 thus a(5) = 1*2 mod 3 = 2.
n = 8: 8_10 = 22_3 thus a(8) = 2*2 mod 3 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Times @@ IntegerDigits[n, 3], 3]; Array[a, 100, 0] (* Amiram Eldar, Mar 18 2024 *)
  • Python
    from functools import reduce
    from sympy.ntheory import digits
    def A371222(n): return reduce(lambda a,b: a*b%3,digits(n,3)[1:],1) # Chai Wah Wu, Mar 19 2024

Formula

a(n) = A309953(n) mod 3.
a(A081605(n)) = 0.
Previous Showing 31-40 of 41 results. Next