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

A013936 a(n) = Sum_{k=1..n} floor(n/k^2).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 12, 13, 14, 16, 17, 18, 19, 22, 23, 25, 26, 28, 29, 30, 31, 33, 35, 36, 38, 40, 41, 42, 43, 46, 47, 48, 49, 53, 54, 55, 56, 58, 59, 60, 61, 63, 65, 66, 67, 70, 72, 74, 75, 77, 78, 80, 81, 83, 84, 85, 86, 88, 89, 90, 92, 96, 97, 98, 99, 101, 102, 103
Offset: 1

Views

Author

Keywords

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 73, problem 24.

Crossrefs

Cf. A046951.

Programs

  • Maple
    f := n->sum(floor(n/k^2),k=1..n); [ seq(f(j),j=1..100 ];
  • Mathematica
    Table[Sum[Floor[n/k^2],{k,n}],{n,80}] (* Harvey P. Dale, Mar 28 2013 *)
  • PARI
    a(n)=sum(k=1,sqrtint(n),floor(n/k^2))

Formula

a(n) = a(n-1)+A046951(n). Bounded above by n*Pi^2/6: the growth of the differences seems to be roughly proportional to sqrt(n). - Henry Bottomley, Aug 16 2001
Conjecture : limit n ->infinity (Pi^2/6*n-a(n))/sqrt(n) = c = 1.45... - Benoit Cloitre, Jan 10 2003
If lim_{n->infinity} (Pi^2/6*n - a(n)) / sqrt(n) does exist, it converges very slowly. It does appear to be bounded. - Franklin T. Adams-Watters, Nov 17 2006
In fact we have: a(n) = zeta(2)*n+zeta(1/2)*n^(1/2)+O(n^theta) with theta<1/2 and we conjecture that theta=1/4+epsilon is the best possible choice. Also a(n)=sum_{1<=k<=n}floor(sqrt(n/k)). - Benoit Cloitre, Nov 05 2012
G.f.: (1/(1 - x))*Sum_{k>=1} x^(k^2)/(1 - x^(k^2)). - Ilya Gutkovskiy, Feb 11 2017

A130279 Smallest number having exactly n square divisors.

Original entry on oeis.org

1, 4, 16, 36, 256, 144, 4096, 576, 1296, 2304, 1048576, 3600, 16777216, 36864, 20736, 14400, 4294967296, 32400, 68719476736, 57600, 331776, 9437184, 17592186044416, 129600, 1679616, 150994944, 810000, 921600, 72057594037927936
Offset: 1

Views

Author

Reinhard Zumkeller, May 20 2007

Keywords

Comments

A046951(a(n)) = n and A046951(m) <> n for m < a(n);
all terms are smooth squares: if prime(k) is a factor of a(n) then also prime(i) are factors, i
a(p) = 2^(2*(p-1)) for primes p;
if prime(j) is the greatest prime factor of a(n) then a(2*n) = a(n)*prime(j+1)^2;
A001221(a(n)) = A122375(n); A001222(a(n)) = 2*A122376(n).
a(n+1) is the smallest nonsquarefree number m such that Diophantine equation S(x,y) = (x+y) + (x-y) + (x*y) + (x/y) = m has exactly n solutions, for n >= 0 (A353282); example: a(4) = 36 and 36 is the smallest number m such that equation S(x,y) = m has exactly 3 solutions: (9,1), (8,2), (5,5). - Bernard Schott, Apr 13 2022
a(n) is the square of the smallest integer having exactly n divisors (see formula with proof). - Bernard Schott, Oct 01 2022

Crossrefs

Cf. A357450 (similar, but with odd squares divisors).

Programs

  • PARI
    a(n) = my(k=1); while(sumdiv(k, d, issquare(d)) != n, k++); k; \\ Michel Marcus, Jul 15 2019

Formula

From Bernard Schott, Oct 01 2022: (Start)
a(n) = A005179(n)^2.
Proof: Suppose a(n) = Product p_i^(2*e_i), where the p_i are primes. Then the n square divisors are all of the form d = Product p_i^(2*k_i) with 0 <= k_i <= e_i. As a(n) = Product (p_i^e_i)^2 = (Product (p_i^e_i))^2, we get that sqrt(a(n)) = Product (p_i^e_i). This is the prime decomposition of sqrt(a(n)). As there is a bijection between prime factors p_i^(2*k_i) and (p_i^k_i), there is also bijection between square divisors of a(n) and divisors of sqrt(a(n)). We conclude that sqrt(a(n)) is the smallest integer that has exactly n divisors. (End)

A055076 Multiplicity of Max{gcd(d, n/d)} when d runs over divisors of n.

Original entry on oeis.org

1, 2, 2, 1, 2, 4, 2, 2, 1, 4, 2, 2, 2, 4, 4, 1, 2, 2, 2, 2, 4, 4, 2, 4, 1, 4, 2, 2, 2, 8, 2, 2, 4, 4, 4, 1, 2, 4, 4, 4, 2, 8, 2, 2, 2, 4, 2, 2, 1, 2, 4, 2, 2, 4, 4, 4, 4, 4, 2, 4, 2, 4, 2, 1, 4, 8, 2, 2, 4, 8, 2, 2, 2, 4, 2, 2, 4, 8, 2, 2, 1, 4, 2, 4, 4, 4, 4, 4, 2, 4, 4, 2, 4, 4, 4, 4, 2, 2, 2, 1, 2, 8, 2, 4, 8
Offset: 1

Author

Labos Elemer, Jun 13 2000

Keywords

Comments

Number of distinct values of gcd(d, n!/d) if d runs over divisors of n! seems to be A046951(n).
a(n) = 1 iff n is a square. - Bernard Schott, Oct 22 2019
a(n) is the number of the unitary divisors (cf. A077610) of n that are exponentially odd (A268335). - Amiram Eldar, Nov 11 2022
The number of infinitary divisors of n that are squarefree (A005117). - Amiram Eldar, Jan 09 2024

Examples

			n=120, the set of gcd(d, 120/d) values for the 16 divisors of 120 is {1,2,1,2,1,2,1,2,2,1,2,1,2,1,2,1}. The max is 2 and it occurs 8 times, so a(120)=8. This sequence seems to consist of powers of 2.
		

Programs

  • Maple
    with(numtheory):
    a:= n->(p->coeff(p, x, degree(p)))(add(x^igcd(d, n/d), d=divisors(n))):
    seq(a(n), n=1..105);  # Alois P. Heinz, Jul 21 2015
  • Mathematica
    a[n_] := With[{g = GCD[#, n/#]& /@ Divisors[n]}, Count[g, Max[g]]];
    Array[a, 105] (* Jean-François Alcover, Mar 28 2017 *)
    f[p_, e_] := 2^Mod[e, 2]; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Nov 11 2022 *)
  • PARI
    A055076(n) = if(1==n,n,my(es=factor(n)[,2]~); prod(i=1,#es,2^(es[i]%2))); \\ Antti Karttunen, Apr 05 2021
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A055076 n) (if (= 1 n) n (* (+ 1 (A000035 (A067029 n))) (A055076 (A028234 n))))) ;; Antti Karttunen, Dec 02 2017

Formula

Multiplicative with a(p^e) = 2^(e mod 2). - Vladeta Jovovic, Dec 13 2002
a(n) = 2^A162642(n). - Antti Karttunen, Dec 02 2017
a(n) = A034444(A007913(n)). [Found by LODA miner, see C. Krause link. Essentially the same formula as the above ones] - Antti Karttunen, Apr 05 2021
From Amiram Eldar, Sep 09 2023: (Start)
a(n) = A034444(A350389(n)).
Dirichlet g.f.: zeta(2*s) * Product_{p prime} (1 + 2/p^s). (End)
From Vaclav Kotesovec, Sep 09 2023: (Start)
Let f(s) = Product_{p prime} (1 - 3/p^(2*s) + 2/p^(3*s)).
Dirichlet g.f.: zeta(s)^2 * zeta(2*s) * f(s).
Sum_{k=1..n} a(k) ~ (Pi^2 * f(1) * n / 6) * (log(n) + 2*gamma - 1 + 12*zeta'(2)/Pi^2 + f'(1)/f(1)), where
f(1) = A065473 = Product_{primes p} (1 - 3/p^2 + 2/p^3) = 0.286747428434478734107892712789838446434331844097056995641477859336652243...,
f'(1) = f(1) * Sum_{primes p} 6*log(p) / (p^2 + p - 2) = f(1) * 2.798014228561519243358371276385174449737670294137200281334256087932048625...
and gamma is the Euler-Mascheroni constant A001620. (End)

A048111 Number of unitary divisors of n (A034444) < number of non-unitary divisors of n (A048105).

Original entry on oeis.org

16, 32, 36, 48, 64, 72, 80, 81, 96, 100, 108, 112, 128, 144, 160, 162, 176, 180, 192, 196, 200, 208, 216, 224, 225, 240, 243, 252, 256, 272, 288, 300, 304, 320, 324, 336, 352, 360, 368, 384, 392, 396, 400, 405, 416, 432, 441, 448, 450, 464, 468, 480, 484
Offset: 1

Author

Keywords

Comments

Numbers n that are expressible as a product of 2 "nonsquarefree" numbers (i.e., there are 2 integers x,y in A001694 such that n = xy). - Benoit Cloitre, Jan 01 2003
Also numbers having more than one square divisor > 1: A046951(a(n)) > 2. - Reinhard Zumkeller, Apr 08 2003
The asymptotic density of this sequence is 1 - (6/Pi^2)*(1 + Sum_{n>=1} 1/prime(n)^2) = 1 - A059956 * (1 + A085548) = 0.1171394347594477824... . - Amiram Eldar, Sep 25 2022

Examples

			36 is in the sequence since the number of its unitary divisors, {1, 4, 9, 36} is 4 which is smaller than 5, the number of its non-unitary divisors, {2, 3, 6, 12, 18}.
		

Programs

  • Mathematica
    Select[Range[484], DivisorSigma[0, #] > 2^(PrimeNu[#]+1) &] (* Amiram Eldar, Jun 11 2019 *)
  • PARI
    is(n)=my(f=factor(n)[,2],t); for(i=1,#f,if(f[i]>1, if(t||f[i]>3, return(1), t=1))); 0 \\ Charles R Greathouse IV, Sep 17 2015

Formula

A000005(a(n)) > 2^(1 + A001221(a(n))).

A325837 The number of coreful divisors of n that are exponentially odd numbers (A268335).

Original entry on oeis.org

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

Author

Amiram Eldar, Sep 07 2019

Keywords

Comments

First differs from A050361 at n = 64.
From Amiram Eldar, Sep 08 2023: (Start)
The number of exponentially odd divisors of n is A322483(n), and their sum is A033634(n).
A coreful divisor d of a number n is a divisor with the same set of distinct prime factors as n. (End)
Also, the number of divisors of n that are cubefull exponentially odd numbers (A335988). - Amiram Eldar, Feb 11 2024

Crossrefs

Cf. A003557, A005361 (number of coreful divisors), A046951, A268335.

Programs

  • Mathematica
    fun[p_,e_] := Floor[(e+1)/2]; a[n_] := Times@@(fun@@@FactorInteger[n]); Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> (x+1)\2, factor(n)[, 2])); \\ Amiram Eldar, Sep 01 2023

Formula

Multiplicative with a(p^e) = floor((e+1)/2).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Product_{p prime} (1 + 1/(p*(p^2-1))) = 1.231291... (A065487). - Amiram Eldar, Sep 10 2022
a(n) = A046951(A350390(n)) (the number of squares dividing the largest exponentially odd divisor of n). - Amiram Eldar, Sep 01 2023
From Amiram Eldar, Sep 08 2023: (Start)
a(n) = A046951(A003557(n)).
Dirichlet g.f.: zeta(s) * zeta(2*s) * Product_{p prime} (1 - 1/p^(2*s) + 1/p^(3*s)). (End)

Extensions

Name corrected by Amiram Eldar, Sep 08 2023

A351307 Sum of the squares of the square divisors of n.

Original entry on oeis.org

1, 1, 1, 17, 1, 1, 1, 17, 82, 1, 1, 17, 1, 1, 1, 273, 1, 82, 1, 17, 1, 1, 1, 17, 626, 1, 82, 17, 1, 1, 1, 273, 1, 1, 1, 1394, 1, 1, 1, 17, 1, 1, 1, 17, 82, 1, 1, 273, 2402, 626, 1, 17, 1, 82, 1, 17, 1, 1, 1, 17, 1, 1, 82, 4369, 1, 1, 1, 17, 1, 1, 1, 1394, 1, 1, 626, 17, 1, 1
Offset: 1

Author

Wesley Ivan Hurt, Feb 06 2022

Keywords

Comments

Inverse Möbius transform of n^2 * c(n), where c(n) is the characteristic function of squares (A010052). - Wesley Ivan Hurt, Jun 20 2024

Examples

			a(16) = 273; a(16) = Sum_{d^2|16} (d^2)^2 = (1^2)^2 + (2^2)^2 + (4^2)^2 = 273.
		

Crossrefs

Sum of the k-th powers of the square divisors of n for k=0..10: A046951 (k=0), A035316 (k=1), this sequence (k=2), A351308 (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Cf. A010052, A247041 (zeta(5/2)), A008836, A001157.

Programs

  • Mathematica
    f[p_, e_] := (p^(4*(1 + Floor[e/2])) - 1)/(p^4 - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 07 2022 *)
  • PARI
    my(N=99, x='x+O('x^N)); Vec(sum(k=1, N, k^4*x^k^2/(1-x^k^2))) \\ Seiichi Manyama, Feb 12 2022
    
  • Python
    from math import prod
    from sympy import factorint
    def A351307(n): return prod((p**(4+((e&-2)<<1))-1)//(p**4-1) for p,e in factorint(n).items()) # Chai Wah Wu, Jul 11 2024

Formula

a(n) = Sum_{d^2|n} (d^2)^2.
Multiplicative with a(p) = (p^(4*(1+floor(e/2))) - 1)/(p^4 - 1). - Amiram Eldar, Feb 07 2022
G.f.: Sum_{k>0} k^4*x^(k^2)/(1-x^(k^2)). - Seiichi Manyama, Feb 12 2022
From Amiram Eldar, Sep 19 2023: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-4).
Sum_{k=1..n} a(k) ~ (zeta(5/2)/5) * n^(5/2). (End)
a(n) = Sum_{d|n} d^2 * c(d), where c = A010052. - Wesley Ivan Hurt, Jun 20 2024
a(n) = Sum_{d|n} lambda(d)*d^2*sigma_2(n/d), where lambda = A008836. - Ridouane Oudra, Jul 18 2025

A351308 Sum of the cubes of the square divisors of n.

Original entry on oeis.org

1, 1, 1, 65, 1, 1, 1, 65, 730, 1, 1, 65, 1, 1, 1, 4161, 1, 730, 1, 65, 1, 1, 1, 65, 15626, 1, 730, 65, 1, 1, 1, 4161, 1, 1, 1, 47450, 1, 1, 1, 65, 1, 1, 1, 65, 730, 1, 1, 4161, 117650, 15626, 1, 65, 1, 730, 1, 65, 1, 1, 1, 65, 1, 1, 730, 266305, 1, 1, 1, 65, 1, 1, 1, 47450, 1
Offset: 1

Author

Wesley Ivan Hurt, Feb 06 2022

Keywords

Comments

Inverse Möbius transform of n^3 * c(n), where c(n) is the characteristic function of squares (A010052). - Wesley Ivan Hurt, Jun 20 2024

Examples

			a(16) = 4161; a(16) = Sum_{d^2|16} (d^2)^3 = (1^2)^3 + (2^2)^3 + (4^2)^3 = 4161.
		

Crossrefs

Sum of the k-th powers of the square divisors of n for k=0..10: A046951 (k=0), A035316 (k=1), A351307 (k=2), this sequence (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Cf. A010052, A261804 (zeta(7/2)), A008836, A001158.

Programs

  • Mathematica
    f[p_, e_] := (p^(6*(1 + Floor[e/2])) - 1)/(p^6 - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Feb 07 2022 *)
  • PARI
    a(n) = sumdiv(n, d, if (issquare(d), d^3)); \\ Michel Marcus, Mar 24 2023

Formula

a(n) = Sum_{d^2|n} (d^2)^3.
Multiplicative with a(p) = (p^(6*(1+floor(e/2))) - 1)/(p^6 - 1). - Amiram Eldar, Feb 07 2022
From Amiram Eldar, Sep 19 2023: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-6).
Sum_{k=1..n} a(k) ~ (zeta(7/2)/7) * n^(7/2). (End)
G.f.: Sum_{k>=1} k^6 * x^(k^2) / (1 - x^(k^2)). - Ilya Gutkovskiy, Jun 05 2024
a(n) = Sum_{d|n} d^3 * c(d), where c = A010052. - Wesley Ivan Hurt, Jun 20 2024
a(n) = Sum_{d|n} lambda(d)*d^3*sigma_3(n/d), where lambda = A008836. - Ridouane Oudra, Jul 18 2025

A046952 Sets record for f(n) = |{(a,b):a*b=n and a|b}|. Also squares of highly composite numbers A002182.

Original entry on oeis.org

1, 4, 16, 36, 144, 576, 1296, 2304, 3600, 14400, 32400, 57600, 129600, 518400, 705600, 1587600, 2822400, 6350400, 25401600, 57153600, 101606400, 228614400, 406425600, 635040000, 768398400, 2057529600, 2540160000, 3073593600
Offset: 1

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Invented by the HR automatic theory formation program.
Also, integers whose number of square divisors sets a new record. - Bernard Schott, Jan 14 2022
As a(n) is the square of n-th highly composite number (A002182), the record number of square divisors of a(n) is A046951(a(n)) = tau(A002182(n)) = A002183(n) where tau is the divisor counting function (A000005). - Bernard Schott, Jan 15 2022
Integers m for which number of solutions (A353282) to the Diophantine equation S(x,y) = (x+y) + (x-y) + (x*y) + (x/y) = m sets a new record; these records are respectively 0, 1, 2, 3, 5, 7, ... Example: the 5 solutions for S(x,y) = 144 are (36,1), (32,2), (27,3), (20,5), (11,11). - Bernard Schott, Apr 19 2022

Examples

			f(1)=1, (first with 1), f(4)=2 (first with 2), f(16)=3 (first with 3).
		

Crossrefs

Cf. A350756 (similar, with triangular divisors).

Formula

a(n) = A002182(n)^2. - Bernard Schott, Jan 14 2022

A063775 Number of 4th powers dividing n.

Original entry on oeis.org

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

Author

Henry Bottomley, Aug 16 2001

Keywords

Examples

			a(79) = 1 since 79 is divisible by 1 = 1^4.
a(80) = 2 since 80 is divisible by 1 and 16 = 2^4.
a(81) = 2 since 81 is divisible by 1 and 81 = 3^4.
		

Crossrefs

Cf. A046951 (number of squares), A061704 (number of cubes).

Programs

  • Maple
    seq(coeff(series(add(x^(k^4)/(1-x^(k^4)),k=1..n),x,n+1), x, n), n = 1 .. 120); # Muniru A Asiru, Dec 29 2018
  • Mathematica
    nn = 100;f[list_, i_] := list[[i]];
    Table[DirichletConvolve[f[Boole[Map[IntegerQ[#] &, Map[#^(1/4) &,Range[nn]]]], n],f[Table[1, {nn}], n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 07 2015 *)
    f[p_, e_] := 1 + Floor[e/4]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    { for (n=1, 2000, k=2; a=1; while ((p=k^4) <= n, if (n%p == 0, a++); k++); write("b063775.txt", n, " ", a) ) } \\ Harry J. Smith, Aug 30 2009

Formula

a(n) = A000005(A053164(n)) = A046951(A000188(n)).
Multiplicative with a(p^e) = 1 + floor(e/4).
Dirichlet g.f.: zeta^2(4s)*Product_{primes p} (1 + p^(-s) + p^(-2s) + p^(-3s)). - R. J. Mathar, Jan 11 2012
G.f.: Sum_{k>=1} x^(k^4)/(1 - x^(k^4)). - Ilya Gutkovskiy, Mar 21 2017
Dirichlet g.f.: zeta(s) * zeta(4s). - Álvar Ibeas, Dec 29 2018
Sum_{k=1..n} a(k) ~ Pi^4 * n / 90 + Zeta(1/4) * n^(1/4). - Vaclav Kotesovec, Feb 03 2019

A082293 Numbers having exactly one square divisor > 1.

Original entry on oeis.org

4, 8, 9, 12, 18, 20, 24, 25, 27, 28, 40, 44, 45, 49, 50, 52, 54, 56, 60, 63, 68, 75, 76, 84, 88, 90, 92, 98, 99, 104, 116, 117, 120, 121, 124, 125, 126, 132, 135, 136, 140, 147, 148, 150, 152, 153, 156, 164, 168, 169, 171, 172, 175, 184, 188, 189, 198, 204, 207, 212
Offset: 1

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

Numbers of the form m*p^2, p prime and m squarefree (A005117). [Corrected by Peter Munn, Nov 17 2020]
The asymptotic density of this sequence is (6/Pi^2)*Sum_{n>=1} 1/prime(n)^2 = 0.274933... (A222056). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A048111 within A013929.
Subsequence of A252849.
Disjoint union of A048109 and A060687.
A285508 is a subsequence.

Programs

  • Mathematica
    Select[Range[2, 200], MemberQ[{2, 3}, (e = Sort[FactorInteger[#][[;; , 2]]])[[-1]]] && (Length[e] == 1 || e[[-2]] == 1) &] (* Amiram Eldar, Jul 07 2020 *)
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2],,4)); #f && f[1]>1 && f[1]<4 && (#f==1 || f[2]==1) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, primerange
    def A082293(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def f(x): return int(n+x-sum(g(x//p**2) for p in primerange(isqrt(x)+1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025

Formula

A046951(a(n)) = 2.
Previous Showing 21-30 of 141 results. Next