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

A088860 Twice the primorials (first definition), 2*A002110(n).

Original entry on oeis.org

4, 12, 60, 420, 4620, 60060, 1021020, 19399380, 446185740, 12939386460, 401120980260, 14841476269620, 608500527054420, 26165522663340060, 1229779565176982820, 65178316954380089460, 3845520700308425278140
Offset: 1

Views

Author

Lekraj Beedassy, Nov 25 2003

Keywords

Comments

Also, least number m divisible by 4 such that omega(m)=n, where omega=A001221.
Refers to the least number which is the leg of exactly 2^(n-1) primitive Pythagorean triangles.
For n >= 1, a(n) = A097250(n). - G. C. Greubel, Apr 23 2017

Crossrefs

Programs

  • Mathematica
    2*FoldList[Times, 1, Prime[Range[50]]] (* G. C. Greubel, Apr 23 2017 *)

Formula

a(n) = 2*#p(n) = 2*A002110(n).

Extensions

Corrected by G. C. Greubel, Apr 23 2017.
Edited by N. J. A. Sloane, Apr 23 2017

A166469 Number of divisors of n which are not multiples of consecutive primes.

Original entry on oeis.org

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

Views

Author

Matthew Vandermast, Nov 05 2009

Keywords

Comments

Links various subsequences of A025487 with an unusual number of important sequences, including the Fibonacci, Lucas, and other generalized Fibonacci sequences (see cross-references).
If a number is a product of any number of consecutive primes, the number of its divisors which are not multiples of n consecutive primes is always a Fibonacci n-step number. See also A073485, A167447.

Examples

			Since 3 of 30's 8 divisors (6, 15, and 30) are multiples of 2 or more consecutive primes, a(30) = 8 - 3 = 5.
		

Crossrefs

A(A002110(n)) = A000045(n+2); A(A097250(n)) = A000032(n+1). For more relationships involving Fibonacci and Lucas numbers, see A166470-A166473, comment on A081341.
A(A061742(n)) = A001045(n+2); A(A006939(n)) = A000085(n+1); A(A212170(n)) = A000142(n+1). A(A066120(n)) = A166474(n+1).

Programs

  • Mathematica
    Array[DivisorSum[#, 1 &, FreeQ[Differences@ PrimePi@ FactorInteger[#][[All, 1]], 1] &] &, 105] (* Michael De Vlieger, Dec 16 2017 *)
  • PARI
    A296210(n) = { if(1==n,return(0)); my(ps=factor(n)[,1], pis=vector(length(ps),i,primepi(ps[i])), diffsminusones = vector(length(pis)-1,i,(pis[i+1]-pis[i])-1)); !factorback(diffsminusones); };
    A166469(n) = sumdiv(n,d,!A296210(d)); \\ Antti Karttunen, Dec 15 2017

Formula

a) If n has no prime gaps in its factorization (cf. A073491), then, if the canonical factorization of n into prime powers is the product of p_i^(e_i), a(n) is the sum of all products of one or more nonadjacent exponents, plus 1. For example, if A001221(n) = 3, a(n) = e_1*e_3 + e_1 + e_2 + e_3 + 1. If A001221(n) = k, the total number of terms always equals A000045(k+2).
The answer can also be computed in k steps, by finding the answers for the products of the first i powers, for i = 1 to i = k. Let the result of the i-th step be called r(i). r(1) = e_1 + 1; r(2) = e_1 + e_2 +1; for i > 2, r(i) = r(i-1) + e_i * r(i-2).
b) If n has prime gaps in its factorization, express it as a product of the minimum number of A073491's members possible. Then apply either of the above methods to each of those members, and multiply the results to get a(n). a(n) = A000005(n) iff n has no pair of consecutive primes as divisors.
a(n) = Sum_{d|n} (1-A296210(d)). - Antti Karttunen, Dec 15 2017

Extensions

Edited by Matthew Vandermast, May 24 2012

A097246 Replace factors of n that are squares of a prime with the prime succeeding this prime.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 6, 5, 10, 11, 9, 13, 14, 15, 9, 17, 10, 19, 15, 21, 22, 23, 18, 7, 26, 15, 21, 29, 30, 31, 18, 33, 34, 35, 15, 37, 38, 39, 30, 41, 42, 43, 33, 25, 46, 47, 27, 11, 14, 51, 39, 53, 30, 55, 42, 57, 58, 59, 45, 61, 62, 35, 27, 65, 66, 67, 51, 69, 70, 71, 30, 73
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2004

Keywords

Crossrefs

Cf. A097247, A097248 (fixed points of iteration), A097249 (number of iterations needed to reach them for each n), A277886, A277899.

Programs

Formula

Multiplicative with p^e -> NextPrime(p)^floor(e/2) * p^(e mod 2), where p prime and NextPrime(p)=A000040(A049084(p)+1).
a(n) <= n; a(n) = n iff n is squarefree: a(A005117(n)) = A005117(n);
a(m*n) <= a(m)*a(n); a(m*n) = a(m)*a(n) iff m and n are coprime;
a(A000040(k)^n) = A000040(k+1)^floor(n/2)*A000040(k)^(n mod 2); a(2^n) = 3^floor(n/2) * (1 + n mod 2);
a(A000040(k)*A002110(n)/A002110(k-1)) = A000040(k+1)*A002110(n)/A002110(k) for k <= n, see also A097250.
From Antti Karttunen, Nov 15 2016: (Start)
a(1) = 1; for n > 1, a(n) = 2^A000035(A007814(n)) * 3^A004526(A007814(n)) * A003961(a(A064989(n))).
a(n) = A003961(A000188(n)) * A007913(n).
A048675(a(n)) = A048675(n).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (p^4-p^2)/(p^4-nextprime(p)) = 0.4059779303..., where nextprime is A151800. - Amiram Eldar, Nov 29 2022

A112086 a(n) = the period of the first differences of the n-th row of A112060 (or A112070), or 0 if that row does not have a periodic first difference.

Original entry on oeis.org

2, 4, 6, 16, 72, 420, 3240
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2005

Keywords

Comments

These values have been computed empirically. An independent recomputation or a mathematical proof would be welcome. The initial terms factored: 2, 2*2, 2*3, 2*2*2*3*3, 2*2*7*3*5, 2*2*2*3*3*3*3*5, ...

Crossrefs

These are the periods of A010684, A112132, A112133, A112134, A112135, A112136, A112137, etc. (Periods of A112138 & A112139 not computed yet.) If we sum the period length prefixes of these sequences, as Sum_{i=1..a(1)} A010684(i), Sum_{i=1..a(2)} A112132(i), Sum_{i=1..a(3)} A112133(i), etc., we get the sequence 4, 12, 60, 420, 4620, 60060, 1021020, ... (cf. A097250) and when doubled, it yields: 8, 24, 120, 840, 9240, 120120, 2042040, ... (cf. A066631 and A102476).

A097249 a(n) is the number of times we must iterate A097246, starting at n, before the result is squarefree.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 03 2004

Keywords

Comments

a(n) = Min{k: r(n,k)=r(n,k+1)}, where r(n,k)=A097246(r(n,k-1)), r(n,0)=n;
a(A005117(n))=0; a(A097250(n))=n and a(m)A097250(n).

Crossrefs

Programs

  • Mathematica
    f[n_] := Product[{p, e} = pe; NextPrime[p]^Quotient[e, 2] p^Mod[e, 2], {pe, FactorInteger[n]}];
    a[n_] := (NestWhileList[f, n, !SquareFreeQ[#]&] // Length) - 1;
    Array[a, 105] (* Jean-François Alcover, Nov 18 2021 *)
  • PARI
    A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); };
    A097249(n) = if(issquarefree(n),0,1+A097249(A097246(n))); \\ Antti Karttunen, Jul 29 2018

Formula

If A008966(n) = 1 [when n is in A005117], a(n) = 0, otherwise a(n) = 1 + a(A097246(n)). - Antti Karttunen, Jul 29 2018

Extensions

Edited by Sam Alexander, Jan 05 2005

A384656 a(n) = Sum_{k=1..n} A051903(ugcd(n,k)), where ugcd(n,k) is the greatest divisor of k that is a unitary divisor of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 2, 6, 1, 9, 1, 8, 7, 4, 1, 12, 1, 13, 9, 12, 1, 16, 2, 14, 3, 17, 1, 22, 1, 5, 13, 18, 11, 24, 1, 20, 15, 22, 1, 30, 1, 25, 18, 24, 1, 27, 2, 28, 19, 29, 1, 32, 15, 28, 21, 30, 1, 51, 1, 32, 22, 6, 17, 46, 1, 37, 25, 46, 1, 41, 1, 38, 30
Offset: 1

Views

Author

Amiram Eldar, Jun 06 2025

Keywords

Comments

The terms of this sequence can be calculated efficiently using the 1st formula. The value of the function f(n, k) is equal to the number of integers i from 1 to n such that the greatest divisor of k that is a unitary divisor of n is is 1 if k = 1, or k-free if k >= 2 (k-free numbers are numbers that are not divisible by a k-th power other than 1). E.g., f(n, 1) = A047994(n), f(n, 2) = A384048(n), and f(n, 3) = A384049(n).
The record values of a(n)/n are 1, 2, 6, 12, 60, 420, ..., i.e, 1, 2, 6, followed by twice the primorials (A088860, A097250) starting from 2*primorial(2) = 2*A002110(2) = 12. The record values of a(n)/n converge to 5/4.

Examples

			a(4) = A051903(ugcd(4,1)) + A051903(ugcd(4,2)) + A051903(ugcd(4,3)) + A051903(ugcd(4,4)) = A051903(1) + A051903(1) + A051903(1) + A051903(4) = 0 + 0 + 0 + 2 = 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_, k_] := p^e - If[e < k, 0, 1]; a[n_] := Module[{fct = FactorInteger[n], emax, s}, emax = Max[fct[[;; , 2]]]; s = emax * n; Do[s -= Times @@ (f[#1, #2, k] & @@@ fct), {k, 1, emax}]; s]; a[1] = 0; Array[a, 100]
  • PARI
    a(n) = if(n == 1, 0, my(f = factor(n), p = f[,1], e = f[,2], emax = vecmax(e), s = emax*n); for(k = 1, emax, s -= prod(i = 1, #p, p[i]^e[i] - if(e[i] < k, 0, 1))); s);

Formula

a(n) = Sum_{k=1..A051903(n)} (n - f(n, k)) = A051903(n) * n - Sum_{k=1..A051903(n)} f(n, k), where f(n, k) is multiplicative for a given k, with f(p^e, k) = p^e - 1 if e >= k and f(p^e, k) = p^e if e < k.
a(n) = 1 if and only if n is prime.
a(n) >= 2 if and only if n is composite.
a(n) >= n - A047994(n) with equality if and only if n is squarefree (A005117).
a(n) >= 2*n - A047994(n) - A384048(n) with equality if and only if n is cubefree that is not squarefree (i.e., n in A067259, or equivalently, A051903(n) = 2).
a(n) <= A384655(n) with equality if and only if n is squarefree (A005117).
a(n) < 5*n/4 and lim sun_{n->oo} a(n)/n = 5/4.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum{k>=1} (1 - Product_{p prime} (1 - 1/(p^(2*k-1)*(p+1)))) = 0.36292303251495264373... .
Showing 1-6 of 6 results.