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 21-24 of 24 results.

A381974 Primes of the form Sum_{k >= 0} floor(m/3^k) for some number m.

Original entry on oeis.org

2, 5, 13, 17, 19, 23, 31, 41, 53, 59, 61, 67, 71, 89, 97, 101, 103, 107, 127, 131, 139, 149, 151, 157, 163, 167, 179, 191, 193, 197, 211, 223, 227, 229, 233, 251, 257, 263, 269, 277, 283, 313, 317, 331, 337, 349, 353, 373, 379, 383, 409, 419, 421, 431, 439
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2025

Keywords

Examples

			[9/1] + [9/3] + [9/9] = 13, where [ ] = floor, so 13 is in the sequence.
		

Crossrefs

Cf. A000040, A381973. Includes A076481.

Programs

  • Maple
    f:= proc(n) local k; add(floor(n/3^k),k=0..ilog[3](n)) end proc:
    select(isprime, map(f, [$2..100])); # Robert Israel, Apr 21 2025
  • Mathematica
    f[n_] := Sum[Floor[n/3^k], {k, 0, Floor[Log[3, n]]}]  (* A004128 *)
    u = Select[Range[400], PrimeQ[f[#]] &]  (* A381973 *)
    Map[f, u]   (* A381974 *)

A306534 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals: A(n,k) = Sum_{j=0..n} floor(n/k^j).

Original entry on oeis.org

0, 0, 2, 0, 1, 6, 0, 1, 3, 12, 0, 1, 2, 4, 20, 0, 1, 2, 4, 7, 30, 0, 1, 2, 3, 5, 8, 42, 0, 1, 2, 3, 5, 6, 10, 56, 0, 1, 2, 3, 4, 6, 8, 11, 72, 0, 1, 2, 3, 4, 6, 7, 9, 15, 90, 0, 1, 2, 3, 4, 5, 7, 8, 10, 16, 110, 0, 1, 2, 3, 4, 5, 7, 8, 10, 13, 18, 132, 0, 1, 2, 3, 4, 5, 6, 8, 9, 11, 14, 19, 156
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 22 2019

Keywords

Examples

			Square array begins:
   0,  0,  0,  0,  0,  0,  ...
   2,  1,  1,  1,  1,  1,  ...
   6,  3,  2,  2,  2,  2,  ...
  12,  4,  4,  3,  3,  3,  ...
  20,  7,  5,  5,  4,  4,  ...
  30,  8,  6,  6,  6,  5,  ...
		

Crossrefs

Columns k=1..4 give A002378, A005187, A004128, A087069.
Cf. A306533.

Programs

  • Mathematica
    Table[Function[k, Sum[Floor[n/k^j], {j, 0, n}]][i - n + 1], {i, 0, 12}, {n, 0, i}] // Flatten

Formula

G.f. of column k (for k > 1): (1/(1 - x)) * Sum_{j>=0} x^(k^j)/(1 - x^(k^j)).

A346502 a(n) = 3n - (sum of digits of 3n in base 3).

Original entry on oeis.org

0, 2, 4, 8, 10, 12, 16, 18, 20, 26, 28, 30, 34, 36, 38, 42, 44, 46, 52, 54, 56, 60, 62, 64, 68, 70, 72, 80, 82, 84, 88, 90, 92, 96, 98, 100, 106, 108, 110, 114, 116, 118, 122, 124, 126, 132, 134, 136, 140, 142, 144, 148, 150, 152, 160, 162, 164, 168, 170, 172
Offset: 0

Views

Author

Bernard Schott, Jul 21 2021

Keywords

Comments

Terms of A344853 without repetition.
All terms are even.
A new largest gap between 2 consecutive terms is obtained between a(3^m-1) and a(3^m), m >= 0 (see formula).
In base 2, A005187(n) = 2n - (sum of digits of 2n in base 2) is also the exponent of the largest power of 2 dividing (2n)!, but here the exponent of the largest power of 3 dividing (3n)! is not a(n) but A004128(n).

Examples

			a(8) = 24 - (sum of digits of 24 in base 3); 24_10 = 220_3 and 2+2+0 = 4, so a(8) = 24-4 = 20.
		

Crossrefs

Cf. A005187 (similar, with base 2).

Programs

  • Mathematica
    a[n_] := 3*n - Plus @@ IntegerDigits[3*n, 3]; Array[a, 100, 0] (* Amiram Eldar, Jul 22 2021 *)
  • PARI
    a(n) = 3*n - sumdigits(n,3); \\ Kevin Ryde, Jul 21 2021
    
  • Python
    from sympy.ntheory.digits import digits
    def a(n): return 3*n - sum(digits(3*n, 3)[1:])
    print([a(n) for n in range(60)]) # Michael S. Branicky, Jul 28 2021

Formula

a(n) = 3*n - A053735(3*n).
a(n) = 2*A004128(n).
a(n) = A344853(3n).
a(3^n) - a(3^n-1) = 2*(n+1).

A354157 Numerator of generalized Catalan number c_3(n) (see Comments).

Original entry on oeis.org

1, 1, 5, 104, 836, 7315, 202895, 1949900, 19284511, 1754890501, 18058389349, 188502545504, 5973492827120, 63732573470888, 685813307216632, 22303841469480032, 243350841747362492, 2670252449037801100, 265034693078133749180, 2936064912067020698720
Offset: 0

Views

Author

N. J. A. Sloane, May 29 2022, based on Section 18.6 of Cosgrave (2022)

Keywords

Comments

c_3(n) = (1/3)*(1/(n+1/3))*(Product_{i=0..n-1}(n+i+1/3))/n!. The denominators are powers of 3.
If 1/3 is everywhere changed to 1 we get the usual Catalan numbers A000108.

Examples

			The first few c_3(n) are 1, 1/3, 5/9, 104/81, 836/243, 7315/729, 202895/6561, 1949900/19683, 19284511/59049, 1754890501/1594323, 18058389349/4782969, ...
		

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.6.

Crossrefs

Programs

  • Maple
    c := proc(n) 1/3 * 1/(n+1/3) * mul(n + i + 1/3, i = 0..(n-1))/n!: end;
  • Mathematica
    c3[n_] := With[{k = 3}, Pochhammer[n+1+1/k, n-1]/(k*n!)];
    Table[Numerator[c3[n]], {n, 1, 19}] (* Jean-François Alcover, Apr 14 2023 *)
  • PARI
    a(n) = numerator((1/3)*(1/(n+1/3))*prod(i=0, n-1, n+i+1/3)/n!) \\ Rémy Sigrist, May 30 2022

Extensions

More terms from Rémy Sigrist, May 30 2022
a(0)=1 prepended by Alois P. Heinz, Apr 14 2023
Previous Showing 21-24 of 24 results.