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

A235224 a(0) = 0, and for n > 0, a(n) = largest k such that A002110(k-1) <= n, where A002110(k) gives the k-th primorial number.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jan 05 2014

Keywords

Comments

For n > 0: a(n) = (length of row n in A235168) = A055642(A049345(n)).
For n > 0, a(n) gives the length of primorial base expansion of n. Also, after zero, each value n occurs A061720(n-1) times. - Antti Karttunen, Oct 19 2019

Crossrefs

Programs

  • Haskell
    a235224 n = length $ takeWhile (<= n) a002110_list
    
  • Maple
    A235224 := proc(n)
        local k;
        if n = 0 then
            0;
        else
            for k from 0 do
                if A002110(k-1) > n then
                    return k-1 ;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Apr 19 2021
  • Mathematica
    primorial[n_] := Times @@ Prime[Range[n]];
    a[n_] := TakeWhile[primorial /@ Range[0, n], # <= n &] // Length;
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 27 2021 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); }; \\ Antti Karttunen, Oct 19 2019
    
  • PARI
    A235224(n, p=2) = if(!n,n,if(nA235224(n\p, nextprime(p+1)))); \\ (Recursive implementation) - Antti Karttunen, Oct 19 2019

Formula

From Antti Karttunen, Oct 19 2019: (Start)
a(n) = A061395(A276086(n)).
For all n >= 0, a(n) >= A267263(n).
For all n >= 1, A000040(a(n)) > A328114(n). (End)

Extensions

Name corrected to match the data by Antti Karttunen, Oct 19 2019

A328571 Primorial base expansion of n converted into its prime product form, but with all nonzero digits replaced by 1's: a(n) = A007947(A276086(n)).

Original entry on oeis.org

1, 2, 3, 6, 3, 6, 5, 10, 15, 30, 15, 30, 5, 10, 15, 30, 15, 30, 5, 10, 15, 30, 15, 30, 5, 10, 15, 30, 15, 30, 7, 14, 21, 42, 21, 42, 35, 70, 105, 210, 105, 210, 35, 70, 105, 210, 105, 210, 35, 70, 105, 210, 105, 210, 35, 70, 105, 210, 105, 210, 7, 14, 21, 42, 21, 42, 35, 70, 105, 210, 105, 210, 35, 70, 105, 210, 105, 210, 35, 70
Offset: 0

Views

Author

Antti Karttunen, Oct 20 2019

Keywords

Crossrefs

Cf. A276156 (gives the indices where this coincides with A276086).

Programs

  • Mathematica
    rad[n_] := Times @@ FactorInteger[n][[All, 1]];
    A276086[n0_] := Module[{m = 1, i = 1, n = n0, p}, While[n > 0, p = Prime[i]; m *= p^Mod[n, p]; n = Quotient[n, p]; i++]; m];
    a[n_] := rad[A276086[n]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 01 2021, after Antti Karttunen in A276086 *)
  • PARI
    A328571(n) = { my(m=1, p=2); while(n, m *= (p^!!(n%p)); n = n\p; p = nextprime(1+p)); (m); };

Formula

a(n) = A007947(A276086(n)).
a(n) = A276086(n) / A328572(n).
a(A276156(n)) = A276086(A276156(n)). [And at no other points the equality holds]
A001221(a(n)) = A267263(n).
a(n) = A083346(A276086(n)). - Antti Karttunen, Feb 28 2021

A329040 Number of distinct primorials in the greedy sum of primorials adding to A108951(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 11 2019

Keywords

Comments

The greedy sum is also the sum with the minimal number of primorials used in the primorial base representation.

Examples

			For n = 18 = 2 * 3^2, A108951(18) = A034386(2) * A034386(3)^2 = 2 * 6^2 = 72 = 2*A002110(3) + 2*A002110(2) = 2*30 + 2*6, and because there occurs only two distinct primorials (30 and 6) in the sum, we have a(18) = 2.
		

Crossrefs

Cf. also A329045, A329046.

Programs

Formula

a(n) = A001221(A324886(n)).
a(n) = A267263(A108951(n)).
a(n) <= A324888(n).

A324653 a(n) = A000203(A276086(n)).

Original entry on oeis.org

1, 3, 4, 12, 13, 39, 6, 18, 24, 72, 78, 234, 31, 93, 124, 372, 403, 1209, 156, 468, 624, 1872, 2028, 6084, 781, 2343, 3124, 9372, 10153, 30459, 8, 24, 32, 96, 104, 312, 48, 144, 192, 576, 624, 1872, 248, 744, 992, 2976, 3224, 9672, 1248, 3744, 4992, 14976, 16224, 48672, 6248, 18744, 24992, 74976, 81224, 243672, 57, 171, 228
Offset: 0

Views

Author

Antti Karttunen, Mar 10 2019

Keywords

Crossrefs

Cf. A267263, A276150, A324650, A324655 for omega, bigomega, phi and tau analogs, and also A324654.
Cf. also A324054.

Programs

  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A324653(n) = sigma(A276086(n));

Formula

a(n) = A000203(A276086(n)).
For n >= 1, a(A002110(n-1)) = 1+A000040(n).

A324650 a(n) = A000010(A276086(n)).

Original entry on oeis.org

1, 1, 2, 2, 6, 6, 4, 4, 8, 8, 24, 24, 20, 20, 40, 40, 120, 120, 100, 100, 200, 200, 600, 600, 500, 500, 1000, 1000, 3000, 3000, 6, 6, 12, 12, 36, 36, 24, 24, 48, 48, 144, 144, 120, 120, 240, 240, 720, 720, 600, 600, 1200, 1200, 3600, 3600, 3000, 3000, 6000, 6000, 18000, 18000, 42, 42, 84, 84, 252, 252, 168, 168, 336, 336, 1008, 1008
Offset: 0

Views

Author

Antti Karttunen, Mar 10 2019

Keywords

Comments

Terms are duplicated because phi(2*(2n+1)) = phi(2n+1) for all n >= 0.

Crossrefs

Cf. A000010, A002110, A276086, A324651 (bisection).
Cf. also A267263, A276150, A324653, A324655 for omega, bigomega, sigma and tau analogs.
Cf. also A290077.

Programs

  • PARI
    A324650(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr), m *= (prime(i)-1)*(prime(i)^(((n%nextpr)/pr)-1)); n-=(n%nextpr));pr=nextpr); (m); };
    
  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A324650(n) = eulerphi(A276086(n));

Formula

a(n) = A000010(A276086(n)).
a(2n+1) = a(2n) for all n >= 0.
For n >= 1, a(A002110(n-1)) = A000040(n)-1.

A324655 a(n) = A000005(A276086(n)).

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 2, 4, 4, 8, 6, 12, 3, 6, 6, 12, 9, 18, 4, 8, 8, 16, 12, 24, 5, 10, 10, 20, 15, 30, 2, 4, 4, 8, 6, 12, 4, 8, 8, 16, 12, 24, 6, 12, 12, 24, 18, 36, 8, 16, 16, 32, 24, 48, 10, 20, 20, 40, 30, 60, 3, 6, 6, 12, 9, 18, 6, 12, 12, 24, 18, 36, 9, 18, 18, 36, 27, 54, 12, 24, 24, 48, 36, 72, 15, 30, 30, 60, 45, 90, 4, 8, 8
Offset: 0

Views

Author

Antti Karttunen, Mar 10 2019

Keywords

Comments

Alternative construction: write n down in primorial base (as in A049345, taking care of not mangling digits larger than 9), increment all the digits by one, and multiply together to get a(n). a(0) = 1 either as an empty product, or as a product of any number of 1's. See examples.

Examples

			For n = 11, its primorial base representation is "121" as 11 = 1*A002110(2) + 2*A002110(1) + 1*A002110(0) = 1*6 + 2*2 + 1*1, thus a(11) = (1+1)*(2+1)*(1+1) = 12.
For n = 13, its primorial base representation is "201" as 13 = 2*6 + 0*2 + 1*1, thus a(13) = (2+1)*(0+1)*(1+1) = 6.
		

Crossrefs

Cf. A000005, A002110 (positions of 2's), A049345, A276086.
Cf. also A267263, A276150, A324650, A324653 for omega, bigomega, phi and sigma analogs.

Programs

  • PARI
    A324655(n) = { my(t=1,m); forprime(p=2, , if(!n, return(t)); m = n%p; t *= (1+m); n = (n-m)/p); };
    
  • PARI
    A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; };
    A324655(n) = numdiv(A276086(n));

Formula

a(n) = A000005(A276086(n)).
a(A002110(n)) = 2.

A328841 Substitute ones for all nonzero digits in primorial base expansion of n, then convert back to decimal.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 30, 31, 32, 33, 32, 33, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 30, 31, 32, 33, 32, 33, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 30
Offset: 0

Views

Author

Antti Karttunen, Oct 30 2019

Keywords

Crossrefs

Cf. A276156 (fixed points).
Cf. A276008 for analogous sequence.

Programs

  • PARI
    A328841(n) = { my(p=2, r=1, s=0); while(n, s += ((!!(n%p))*r); r *= p; n = n\p; p = nextprime(1+p)); (s); };

Formula

a(n) = n - A328842(n).
For all n>= 0, a(A276086(n)) = A328843(n).
For all n >= 1, A257993(a(n)) = A257993(n).
For all n >= 0, A328570(a(n)) = A328570(n), A328620(a(n)) = A328620(n), and A267263(a(n)) = A267263(n).

A328835 Prime shadow of primorial base exp-function: a(n) = A181819(A276086(n)).

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 2, 4, 4, 8, 6, 12, 3, 6, 6, 12, 9, 18, 5, 10, 10, 20, 15, 30, 7, 14, 14, 28, 21, 42, 2, 4, 4, 8, 6, 12, 4, 8, 8, 16, 12, 24, 6, 12, 12, 24, 18, 36, 10, 20, 20, 40, 30, 60, 14, 28, 28, 56, 42, 84, 3, 6, 6, 12, 9, 18, 6, 12, 12, 24, 18, 36, 9, 18, 18, 36, 27, 54, 15, 30, 30, 60, 45, 90, 21, 42, 42, 84, 63, 126, 5, 10, 10, 20, 15, 30, 10, 20, 20
Offset: 0

Views

Author

Antti Karttunen, Oct 29 2019

Keywords

Comments

From Antti Karttunen, Apr 30 2022: (Start)
These are prime-factorization representations of single-variable polynomials where the coefficient of term x^(k-1) (encoded as the exponent of prime(k) in the factorization of n) is equal to the number of times a nonzero digit k occurs in the primorial base representation of n.
Note that this sequence, and all the sequences derived from it as b(n) = f(a(n)), [where f is any integer-valued function] can be represented as b(n) = g(A278226(n)), where g(n) = f(A181819(n)). E.g., if f is the identity function (so that b(n) is this sequence), then g(n) is A181819(n). See the comment and formulas in the latter sequence.
(End)

Crossrefs

Programs

  • PARI
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328835(n) = A181819(A276086(n));

Formula

a(n) = A181819(A276086(n)).
A001222(a(n)) = A267263(n).
A007814(a(n)) = A328614(n).
A061395(a(n)) = A328114(n).
For all n >= 0, a(n) = A181819(A278226(n)) and A181821(a(n)) = A278226(n). - Antti Karttunen, Apr 30 2022

A277022 Primorial base representation of n is rewritten as a base-2 number with each nonzero digit k replaced by a run of k 1's (followed by one extra zero if not the rightmost run of 1's) and with each 0 kept as 0.

Original entry on oeis.org

0, 1, 2, 5, 6, 13, 4, 9, 10, 21, 22, 45, 12, 25, 26, 53, 54, 109, 28, 57, 58, 117, 118, 237, 60, 121, 122, 245, 246, 493, 8, 17, 18, 37, 38, 77, 20, 41, 42, 85, 86, 173, 44, 89, 90, 181, 182, 365, 92, 185, 186, 373, 374, 749, 188, 377, 378, 757, 758, 1517, 24, 49, 50, 101, 102, 205, 52, 105, 106, 213, 214, 429, 108, 217, 218, 437, 438, 877, 220
Offset: 0

Views

Author

Antti Karttunen, Sep 26 2016

Keywords

Examples

			9 = "111" in primorial base (A002110(0) + A002110(1) + A002110(2) = 9) is converted to three 1-bits, with separating zeros, in binary as "10101" = A007088(21), thus a(9) = 21.
91 = "3001" in primorial base (91 = 3*A002110(3) + A002110(0)) is converted to binary number "1110001" = A007088(113), thus a(91) = 113. Note how two of the zeros come from the primorial base representation and the third zero is an extra separating zero inserted after each run of 1-bits apart from the rightmost 1-run.
120 = "4000" in primorial base (120 = 4*A002110(3)) is converted to the binary number "1111000" = A007088(120), thus a(120) = 120.
		

Crossrefs

Cf. A277018 (terms sorted into ascending order).
Cf. A277021 (a left inverse).
Differs from analogous A277012 for the first time at n=24, where a(24) = 60, while A277012(24) = 8.

Formula

a(0) = 0; for n >= 1, a(n) = A000225(A276088(n))*A000079(A276084(n)) + A000079(A276088(n))*a(A276093(n)).
a(n) = A156552(A276086(n)).
Other identities. For all n >= 0:
A277021(a(n)) = n.
A005940(1+a(n)) = A276086(n).
A000035(a(n)) = A000035(n). [Preserves the parity of n.]
A000120(a(n)) = A276150(n).
A069010(a(n)) = A267263(n).

A305458 In primorial base: a(n) is obtained by replacing each nonzero digit of n with its product with the nonzero digits at lower indices (See Comments for precise definition).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 16, 17, 12, 13, 14, 15, 28, 29, 18, 19, 20, 21, 10, 11, 24, 25, 26, 27, 22, 23, 30, 31, 32, 33, 64, 65, 36, 37, 38, 39, 76, 77, 72, 73, 74, 75, 148, 149, 108, 109, 110, 111, 190, 191, 144, 145, 146, 147, 52, 53, 60, 61, 62, 63
Offset: 0

Views

Author

Rémy Sigrist, Jun 01 2018

Keywords

Comments

For a number n >= 0, let d_k, ..., d_0 be the digits of n in primorial base (n = Sum_{i=0..k} d_i * A002110(i), and for i = 0..k, 0 <= d_i < prime(i+1)); the digits of a(n) in primorial base, say e_k, ..., e_0, satisfy: for i = 0..k:
- if d_i = 0, then e_i = 0,
- if d_i > 0, then e_i == Product_{j=0..i and d_j > 0} d_j (mod prime(i+1)).
This sequence is a permutation of the nonnegative integers with inverse A305463.
The fixed points of this sequence (A305462) correspond to the numbers with all digits, except possibly the leading digit, equal to zero or one in primorial base.
Like A289234, this sequence preserves the number of digits and the number of nonzero digits in primorial base.
For any prime number p:
- we can build an analog of this sequence, say f_p, for the base p,
- in particular, f_2 = A001477,
- f_p is a permutation of the nonnegative integers,
- f_p preserves the number of digits and the number of nonzero digits in base p,
- the fixed points of f_p correspond to the numbers with all digits, except possibly the leading digit, equal to zero or one in base p.

Examples

			The digits of 7772 in primorial base are 3,4,0,0,1,0.
Also:
- 1 == 1 (mod prime(2)),
- 4 * 1 == 4 (mod prime(5)),
- 3 * 4 * 1 == 12 (mod prime(6)).
Hence the digits of a(7772) in primorial base are 12,4,0,0,1,0, and a(7772) = 28562.
		

Crossrefs

Cf. A001477, A002110, A049345, A235224, A267263, A289234, A305462 (fixed points), A305463 (inverse).

Programs

  • PARI
    a(n) = my (v=0, k=1, r=2, p=1); while (n, my (d=n % r); if (d, k *= d; v += p * lift(Mod(k, r))); n \= r; p *= r; r = nextprime(r+1)); return (v)

Formula

A235224(a(n)) = A235224(n).
A267263(a(n)) = A267263(n).
Previous Showing 11-20 of 30 results. Next