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-30 of 30 results.

A324341 If 2n = 2^e1 + ... + 2^ek [e1 .. ek distinct], then a(n) is the number of nonzero digits when A002110(e1) * ... * A002110(ek) is written in primorial base.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 23 2019

Keywords

Comments

Number of nonzero digits when A283477(n) is represented in primorial base, A049345.
Number of distinct prime factors in A324289(n).

Crossrefs

Programs

Formula

a(n) = A267263(A283477(n)).
a(n) <= A324342(n).

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]

A328318 Number of nonzero digits in representation of A328316(n) in primorial base; Number of distinct prime factors in A328316(1+n).

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 5, 16, 104, 7447
Offset: 0

Views

Author

Antti Karttunen, Oct 14 2019

Keywords

Crossrefs

Programs

  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328316(n) = if(!n,0,A276086(A328316(n-1)));
    A267263(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += !!d; n = (n-d)/p; p = nextprime(1+p)); (s); };
    A328318(n) = A267263(A328316(n));
    \\ Or alternatively, more slowly as:
    A328318(n) = omega(A328316(1+n));

Formula

a(n) = A267263(A328316(n)).
a(n) = A001221(A328316(1+n)).

A328482 Number of distinct terms required when n is expressed as a greedy sum of terms of A129912 (number of nonzero digits when n is expressed in greedy A129912-base).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Examples

			Terms of A129912 (numbers that are products of distinct primorial numbers) begin as: 1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, ...
Number 5 is expressed as 5 = 2 + 2 + 1 = 2*2 + 1*1, when always choosing the largest term which is <= {what is remaining of the original number}. Thus a(5) = 2 (number of distinct terms used, 1 and 2).
Number 21 is expressed as 21 = 12 + 6 + 2 + 1, thus a(21) = 4.
		

Crossrefs

Programs

  • PARI
    isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || tA129912
    prepare_A129912_upto(n) = { my(xs=List([]), k=0); while(kA129912(k), listput(xs,k))); List(Vecrev(xs)); };
    number_of_distinct_terms_in_greedy_sum(n,terms) = { my(c=0); while(n,if(terms[1] > n, listpop(terms,1), c++; n %= terms[1])); (c); };
    A328482(n) = number_of_distinct_terms_in_greedy_sum(n,prepare_A129912_upto(n));

Formula

a(A129912(n)) = a(A002110(n)) = 1.
For all n, a(n) <= A328481(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)).

A342461 Number of nonzero digits when A329886(n) is written in primorial base, where A329886 is the primorial inflation of Doudna-tree.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 15 2021

Keywords

Crossrefs

Programs

Formula

a(n) = A001221(A342456(n)) = A001221(A342457(n)).
a(n) = A267263(A329886(n)) = A329040(A005940(1+n)).
a(n) <= A342462(n).
For n >= 0, a(2^n) = 1.

A346470 a(n) = psi(A276086(n)), where psi is Dedekind psi function A001615, and A276086 is the prime product form of primorial base expansion of n.

Original entry on oeis.org

1, 3, 4, 12, 12, 36, 6, 18, 24, 72, 72, 216, 30, 90, 120, 360, 360, 1080, 150, 450, 600, 1800, 1800, 5400, 750, 2250, 3000, 9000, 9000, 27000, 8, 24, 32, 96, 96, 288, 48, 144, 192, 576, 576, 1728, 240, 720, 960, 2880, 2880, 8640, 1200, 3600, 4800, 14400, 14400, 43200, 6000, 18000, 24000, 72000, 72000, 216000, 56, 168, 224, 672
Offset: 0

Views

Author

Antti Karttunen, Jul 21 2021

Keywords

Crossrefs

Cf. A001615.
Other number-theoretical functions similarly applied to A276086: A267263 (omega), A276150 (bigomega), A324650 (phi), A324653 (sigma), A324655 (tau), A327860 (arithmetic derivative).
Cf. also A346471, A346475.

Programs

  • PARI
    A346470(n) = { my(m=1, p=2, e); while(n, e = (n%p); if(e, m *= (p+1)*(p^(e-1))); n = n\p; p = nextprime(1+p)); (m); };

Formula

a(n) = A001615(A276086(n)).

A371091 Number of 1's in the recursive decomposition of primorial base expansion of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 31 2024

Keywords

Comments

Take the primorial base expansion of n (A049345), and then replace any digit larger than 1 with its own primorial base expansion, and do this recursively until no digits larger than 1 remain. a(n) is then the number of 1's in the completed decomposition. (See the examples). This decomposition offers a way to design a natural primorial based numeral system that does not require an infinite number of arbitrary glyphs for its digits, but instead suffices with just two graphically distinct subfigures whose exact positions in the whole hierarchically organized composite glyph determines the numerical value of that glyph, a bit like in Maya numerals or Babylonian cuneiform digits, but based on a primorial number system instead of vigesimal or sexagesimal.

Examples

			     n  A049345(n)     recursive              a(n) = number of 1's
                       decomposition          in the decomposition
--------------------------------------------------------------------
     0         0         ()                             0
     1         1         (1)                            1
     2        10         (1 0)                          1
     3        11         (1 1)                          2
     4        20         ((1 0) 0)                      1
     5        21         ((1 0) 1)                      2
     6       100         (1 0 0)                        1
     7       101         (1 0 1)                        2
     8       110         (1 1 0)                        2
     9       111         (1 1 1)                        3
    10       120         (1 (1 0) 0)                    2
    11       121         (1 (1 0) 1)                    3
    12       200         ((1 0) 0 0)                    1
    ..
    21       311         ((1 1) 1 1)                    4
    ..
    24       400         (((1 0) 0) 0 0)                1
    ..
    29       421         (((1 0) 0) (1 0) 1)            3
    30      1000         (1 0 0 0)                      1
    ..
    51      1311         (1 (1 1) 1 1)                  5
    ..
    59      1421         (1 ((1 0) 0) (1 0) 1)          4
    60      2000         ((1 0) 0 0 0)                  1
    ..
   111      3311         ((1 1) (1 1) 1 1)              6
   ...
   360     15000         (1 ((1 0) 1) 0 0 0)            3
   ...
  2001     93311         ((1 1 1) (1 1) (1 1) 1 1)      9
  ....
  4311    193311         (1 (1 1 1) (1 1) (1 1) 1 1)   10.
29 is decomposed in piecemeal fashion as: A049345(29) = 421 --> ("20" "10" "1") --> (((1 0) 0) (1 0) 1).
		

Crossrefs

Cf. A372559 (positions of records and the first occurrence of n).
Differs from A328482 for the first time at n=360, where a(360) = 3, while A328482(360) = 1.

Programs

Formula

a(n) = A371090(A276086(n)).
For all n, A267263(n) <= a(n) <= A276150(n).

A331172 a(n) = min(n, A289234(n)), where A289234 is primorial base "reciprocal" flip.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 12, 13, 14, 15, 16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 42, 43, 44, 45, 46, 47, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Jan 12 2020

Keywords

Comments

For all i, j:
a(i) = a(j) => A267263(i) = A267263(j).
For all i, j > 0:
a(i) = a(j) => A053669(i) = A053669(j).

Crossrefs

Programs

  • PARI
    A289234(n) = { my(pr=1, p=2, v=0); while(n>0, my (d=n%p); if(d>0, v += pr * lift(1/Mod(d, p))); pr *= p; n \= p; p = nextprime(p+1)); return(v); }; \\ From A289234.
    A331172(n) = min(n, A289234(n));

Formula

a(n) = min(n, A289234(n)).

A365460 Number of distinct primorials in the greedy sum of primorials adding to A181821(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 4, 1, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 4, 1, 3, 3, 2, 1, 5, 3, 3, 1, 3, 2, 3, 2, 2, 3, 5, 1, 3, 2, 3, 2, 5, 2, 2, 1, 3, 4, 5, 2, 5, 4, 3, 1, 3, 2, 6, 2, 4, 2, 6, 1, 6, 4, 3, 3, 4, 3, 6, 1, 3, 3, 7, 2, 4, 4, 4, 2, 8, 2, 4, 3, 4, 4, 4, 1, 6, 3, 3, 2, 6, 3, 7, 2, 3
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2023

Keywords

Crossrefs

Programs

  • PARI
    A181821(n) = { my(f=factor(n),p=0,m=1); forstep(i=#f~,1,-1,while(f[i,2], f[i,2]--; m *= (p=nextprime(p+1))^primepi(f[i,1]))); (m); };
    A267263(n) = { my(s=0, p=2, d); while(n, d = (n%p); s += !!d; n = (n-d)/p; p = nextprime(1+p)); (s); };
    A365460(n) = A267263(A181821(n));

Formula

a(n) = A267263(A181821(n)).
a(n) = A329040(A122111(n)).
a(n) <= A365461(n).
Previous Showing 21-30 of 30 results.