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.

Showing 1-3 of 3 results.

A328620 Number of nonleading zeros in primorial base expansion of n, a(0) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 23 2019

Keywords

Crossrefs

Cf. A257510 for an analogous sequence.

Programs

  • Mathematica
    a[n_] := Module[{k = n, p = 2, s = 0, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r == 0, s++]; p = NextPrime[p]]; s]; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    A328620(n) = { my(s=0, p=2); while(n, s += (0==(n%p)); n = n\p; p = nextprime(1+p)); (s); };

Formula

a(n) = A001221(A328612(n)).
a(n) = A079067(A276086(n)).
a(A002110(n)) = n for all n >= 0.

A328614 Number of 1-digits in primorial base expansion of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 22 2019

Keywords

Examples

			In primorial base (A049345), 87 is written as "2411" because 87 = 2*A002110(3) + 4*A002110(2) + 1*A002110(1) + 1*A002110(0) = 2*30 + 4*6 + 1*2 + 1*1. Only two of these digits are "1"'s, thus a(87) = 2.
		

Crossrefs

Cf. A143293 (positions of records after initial zero).
Cf. also A257511.

Programs

  • Mathematica
    a[n_] := Module[{k = n, p = 2, s = 0, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r == 1, s++]; p = NextPrime[p]]; s]; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    A328614(n) = { my(s=0, p=2); while(n, s += (1==(n%p)); n = n\p; p = nextprime(1+p)); (s); };

Formula

a(n) = A056169(A276086(n)).
a(n) = A267263(n) - A328615(n).
For n >= 1, a(A143293(n-1)) = n. [This is the first occurrence of each n]

A328615 Number of digits larger than 1 in primorial base expansion of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 22 2019

Keywords

Examples

			In primorial base (A049345), 87 is written as "2411" because 87 = 2*A002110(3) + 4*A002110(2) + 1*A002110(1) + 1*A002110(0) = 2*30 + 4*6 + 1*2 + 1*1. Only the digits 2 and 4 of these are larger than one, thus a(87) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = n, p = 2, s = 0, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r > 1, s++]; p = NextPrime[p]]; s]; Array[a, 100, 0] (* Amiram Eldar, Mar 13 2024 *)
  • PARI
    A328615(n) = { my(s=0, p=2); while(n, s += (1<(n%p)); n = n\p; p = nextprime(1+p)); (s); };

Formula

a(n) = A267263(n) - A328614(n).
a(n) = A001221(A328572(n)).
Showing 1-3 of 3 results.