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

A248909 Completely multiplicative with a(p) = p if p = 6k+1 and a(p) = 1 otherwise.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 13, 7, 1, 1, 1, 1, 19, 1, 7, 1, 1, 1, 1, 13, 1, 7, 1, 1, 31, 1, 1, 1, 7, 1, 37, 19, 13, 1, 1, 7, 43, 1, 1, 1, 1, 1, 49, 1, 1, 13, 1, 1, 1, 7, 19, 1, 1, 1, 61, 31, 7, 1, 13, 1, 67, 1, 1, 7, 1, 1, 73, 37, 1, 19, 7, 13, 79, 1, 1
Offset: 1

Views

Author

Tom Edgar, Mar 06 2015

Keywords

Comments

To compute a(n) replace primes not of the form 6k+1 in the prime factorization of n by 1.
The first place this sequence differs from A170824 is at n = 49.
For p prime, a(p) = p if p is a term in A002476 and a(p) = 1 if p = 2, p = 3 or p is a term in A007528.
a(n) is the largest term of A004611 that divides n. - Peter Munn, Mar 06 2021

Examples

			a(49) = 49 because 49 = 7^2 and 7 = 6*1 + 1.
a(15) = 1 because 15 = 3*5 and neither of these primes is of the form 6k+1.
a(62) = 31 because 62 = 31*2, 31 = 6*5 + 1, and 2 is not of the form 6k+1.
		

Crossrefs

Sequences used in a definition of this sequence: A002476, A004611, A007528, A020639, A028234, A032742.
Equivalent sequence for distinct prime factors: A170824.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A343430 (3k-1), A170818 (4k+1), A097706 (4k-1), A343431 (6k-1), A065330 (6k+/-1), A065331 (<= 3).

Programs

  • Maple
    A248909 := proc(n)
        local a,pf;
        a := 1 ;
        for pf in ifactors(n)[2] do
            if modp(op(1,pf),6) = 1 then
                a := a*op(1,pf)^op(2,pf) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 14 2015
  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 1, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i,1] - 1) % 6, f[i, 1] = 1);); factorback(f);} \\ Michel Marcus, Mar 11 2015
    
  • Python
    from sympy import factorint
    def A248909(n):
        y = 1
        for p,e in factorint(n).items():
            y *= (1 if (p-1) % 6 else p)**e
        return y # Chai Wah Wu, Mar 15 2015
    
  • Sage
    n=100; sixnplus1Primes=[x for x in primes_first_n(100) if (x-1)%6==0]
    [prod([(x^(x in sixnplus1Primes))^y for x,y in factor(n)]) for n in [1..n]]
    
  • Scheme
    (define (A248909 n) (if (= 1 n) n (* (if (= 1 (modulo (A020639 n) 6)) (A020639 n) 1) (A248909 (A032742 n))))) ;; Antti Karttunen, Jul 09 2017

Formula

a(1) = 1; for n > 1, if A020639(n) = 1 (mod 6), a(n) = A020639(n) * a(A032742(n)), otherwise a(n) = a(A028234(n)). - Antti Karttunen, Jul 09 2017
a(n) = a(A065330(n)). - Peter Munn, Mar 06 2021

A385045 The sum of the unitary divisors of n that are 5-rough numbers (A007310).

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 8, 1, 1, 6, 12, 1, 14, 8, 6, 1, 18, 1, 20, 6, 8, 12, 24, 1, 26, 14, 1, 8, 30, 6, 32, 1, 12, 18, 48, 1, 38, 20, 14, 6, 42, 8, 44, 12, 6, 24, 48, 1, 50, 26, 18, 14, 54, 1, 72, 8, 20, 30, 60, 6, 62, 32, 8, 1, 84, 12, 68, 18, 24, 48, 72, 1, 74, 38
Offset: 1

Views

Author

Amiram Eldar, Jun 16 2025

Keywords

Comments

First differs from A186099 at n = 25; a(25) = 26, while A186099(25) = 31.
The number of these divisors is A385044(n), and the largest of them is A065330(n).

Crossrefs

The unitary analog of A186099.
The sum of unitary divisors of n that are: A092261 (squarefree), A192066 (odd), A358346 (exponentially odd), A358347 (square), A360720 (powerful), A371242 (cubefree), A380396 (cube), A383763 (exponentially squarefree), A385043 (exponentially 2^n), this sequence (5-rough), A385046 (3-smooth), A385047 (power of 2), A385048 (cubefull), A385049 (biquadratefree).

Programs

  • Mathematica
    f[p_, e_] := If[p <= 3, 1, p^e + 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] < 5, 1, f[i, 1]^f[i, 2] + 1));}

Formula

Multiplicative with a(p^e) = 1 if p <= 3, and p^e + 1 if p >= 5.
a(n) = A034448(n)/A385046(n).
a(n) <= A034448(n), with equality if and only if n is 5-rough.
a(n) <= A186099(n).
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s-1)) * ((1-1/2^(s-1))/(1-1/2^(2*s-1))) * ((1-1/3^(s-1))/(1-1/3^(2*s-1))).
Sum_{k=1..n} a(k) ~ c * n^2, where c = 3*Pi^2/(91*zeta(3)) = 0.270679... .

A265398 Perform one x^2 -> x+1 reduction for the polynomial with nonnegative integer coefficients that is encoded in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 6, 6, 15, 8, 9, 12, 35, 12, 77, 30, 18, 16, 143, 18, 221, 24, 45, 70, 323, 24, 36, 154, 27, 60, 437, 36, 667, 32, 105, 286, 90, 36, 899, 442, 231, 48, 1147, 90, 1517, 140, 54, 646, 1763, 48, 225, 72, 429, 308, 2021, 54, 210, 120, 663, 874, 2491, 72, 3127, 1334, 135, 64, 462, 210, 3599, 572, 969, 180, 4087, 72
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2015

Keywords

Comments

Completely multiplicative with a(2) = 2, a(3) = 3, a(prime(k)) = prime(k-1) * prime(k-2) for k > 2. - Andrew Howroyd & Antti Karttunen, Aug 04 2018

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{k, p, e}, Which[n<4, n, PrimeQ[n], k = PrimePi[n]; Prime[k-1] Prime[k-2], True, Product[{p, e} = pe; a[p]^e, {pe, FactorInteger[n]}]]];
    a /@ Range[1, 72] (* Jean-François Alcover, Sep 20 2019 *)
    f[p_, e_] := If[p < 5, p, NextPrime[p,-1]*NextPrime[p,-2]]^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 01 2022 *)
  • PARI
    A065330(n) = { while(0 == (n%2), n = n/2); while(0 == (n%3), n = n/3); n; }
    A065331 = n -> n/A065330(n);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A265398(n) = { my(a); if(1 == n, n, a = A064989(A065330(n)); A064989(a)*a*A065331(n)); };
    
  • PARI
    r(p) = {my(q = precprime(p-1)); q*precprime(q-1)};
    a(n) = {my(f=factor(n)); prod(i=1, #f~, if(f[i,1]<5, f[i,1], r(f[i,1]))^f[i,2])}; \\ Amiram Eldar, Dec 01 2022
    
  • Scheme
    (definec (A265398 n) (if (= 1 n) n (* (A065331 n) (A064989 (A065330 n)) (A064989 (A064989 (A065330 n))))))

Formula

a(1) = 1; for n > 1, a(n) = A064989(A064989(A065330(n))) * A064989(A065330(n)) * A065331(n).
Sum_{k=1..n} a(k) = c * n^3, where c = (1/3) * Product_{p prime} (p^3-p^2)/(p^3-a(p)) = 0.093529982... . - Amiram Eldar, Dec 01 2022

Extensions

Keyword mult added by Antti Karttunen, Aug 04 2018

A336561 Numbers k at which point A336459(k) appears multiplicative, but A051027(k) does not.

Original entry on oeis.org

506, 1819, 2024, 2714, 3674, 3818, 4554, 5088, 5750, 5786, 6026, 6762, 6842, 7215, 7276, 9487, 9523, 10442, 11895, 12397, 12650, 13178, 13303, 14235, 14696, 15272, 15962, 16346, 16371, 18216, 18458, 19274, 19514, 19690, 19706, 20179, 20378, 21079, 21255, 21626, 22066, 22586, 22682, 23000, 23144, 23322, 24104, 24246
Offset: 1

Views

Author

Antti Karttunen, Jul 25 2020

Keywords

Examples

			506 = 2*11*23 is a term as A336459(2)*A336459(11)*A336459(23) = 1*7*5 = 35 = A336459(506), while A051027(2)*A051027(11)*A051027(23) = 4*28*60 = 6720 <> A051027(506) = 2520. Note that 2520 = 2^3 * 3^2 * 5 * 7, thus A065330(2520) = 5*7 = 35.
		

Crossrefs

Cf. also A336549.
Subsequence of A336548, and probably also of A336560.

Programs

A343431 Part of n composed of prime factors of the form 6k-1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 11, 1, 1, 1, 5, 1, 17, 1, 1, 5, 1, 11, 23, 1, 25, 1, 1, 1, 29, 5, 1, 1, 11, 17, 5, 1, 1, 1, 1, 5, 41, 1, 1, 11, 5, 23, 47, 1, 1, 25, 17, 1, 53, 1, 55, 1, 1, 29, 59, 5, 1, 1, 1, 1, 5, 11, 1, 17, 23, 5, 71, 1, 1, 1, 25, 1, 11, 1, 1, 5, 1, 41, 83, 1, 85, 1, 29, 11, 89, 5
Offset: 1

Views

Author

Peter Munn, Apr 15 2021

Keywords

Comments

Completely multiplicative with a(p) = p if p is of the form 6k-1 and a(p) = 1 otherwise.
Largest term of A259548 that divides n.

Crossrefs

Equivalent sequence for distinct prime factors: A170825.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A343430 (3k-1), A170818 (4k+1), A097706 (4k-1), A248909 (6k+1), A065330 (6k+/-1), A065331 (<= 3), A355582 (<= 5).
Range of terms: A259548.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 5, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* after Amiram Eldar at A248909 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i, 1] + 1) % 6, f[i, 1] = 1); ); factorback(f); } \\ after Michel Marcus at A248909
    
  • Python
    from math import prod
    from sympy import factorint
    def A343431(n): return prod(p**e for p, e in factorint(n).items() if not (p+1)%6) # Chai Wah Wu, Dec 26 2022

Formula

a(n) = n / A065331(n) / A248909(n) = A065330(n) / A248909(n).

A384042 The number of integers k from 1 to n such that gcd(n,k) is a 5-rough number (A007310).

Original entry on oeis.org

1, 1, 2, 2, 5, 2, 7, 4, 6, 5, 11, 4, 13, 7, 10, 8, 17, 6, 19, 10, 14, 11, 23, 8, 25, 13, 18, 14, 29, 10, 31, 16, 22, 17, 35, 12, 37, 19, 26, 20, 41, 14, 43, 22, 30, 23, 47, 16, 49, 25, 34, 26, 53, 18, 55, 28, 38, 29, 59, 20, 61, 31, 42, 32, 65, 22, 67, 34, 46
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Crossrefs

The number of integers k from 1 to n such that gcd(n,k) is: A026741 (odd), A062570 (power of 2), A063659 (squarefree), A078429 (cube), A116512 (power of a prime), A117494 (prime), A126246 (1 or 2), A206369 (square), A254926 (cubefree), A372671 (3-smooth), A384039 (powerful), A384040 (cubefull), A384041 (exponentially odd), this sequence (5-rough).

Programs

  • Mathematica
    f[p_, e_] := If[p < 5, (p-1)*p^(e-1), p^e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] < 5, (f[i,1]-1)*f[i,1]^(f[i,2]-1), f[i,1]^f[i,2]));}

Formula

Multiplicative with a(p^e) = (p-1)*p^(e-1) if p <= 3 and p^e if p >= 5.
a(n) >= A000010(n), with equality if and only if n is 3-smooth (A003586).
a(n) = A000010(A065331(n)) * A065330(n).
a(n) = 2 * n * phi(n)/phi(6*n) = n * A000010(n) / A372671(n).
Dirichlet g.f.: zeta(s-1) * (1-1/2^s) * (1-1/3^s).
Sum_{k=1..n} a(k) ~ n^2 / 3.

A065332 3-smooth numbers in their natural position, gaps filled with 0.

Original entry on oeis.org

1, 2, 3, 4, 0, 6, 0, 8, 9, 0, 0, 12, 0, 0, 0, 16, 0, 18, 0, 0, 0, 0, 0, 24, 0, 0, 27, 0, 0, 0, 0, 32, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    smooth3Q[n_] := n == 2^IntegerExponent[n, 2]*3^IntegerExponent[n, 3];
    a[n_] := n Boole[smooth3Q[n]];
    Array[a, 100] (* Jean-François Alcover, Oct 17 2021 *)
  • PARI
    a(n) = if(n >> valuation(n, 2) == 3^valuation(n, 3), n, 0); \\ Amiram Eldar, Sep 16 2023

Formula

a(n) = if A065330(n) = 1 then n else 0.
a(n) = A065333(n) * n.
If a(k) > 0 then a(k) = (2^A065334(k)) * (3^A065335(k)).
From Amiram Eldar, Sep 16 2023: (Start)
Multiplicative with a(p^e) = p^e if p <= 3, and 0 otherwise.
Dirichlet g.f.: 6^s / ((2^s-2)*(3^s-3)).
Sum_{k=1..n} a(k) ~ (n/(log(2)*log(3))) * (log(n) + log(6)/2 - 1). (End)

A106799 Number of prime factors of n apart from 2 or 3, counted with multiplicity.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 17 2005

Keywords

Comments

Self-similar in every second and in every third term, i.e., a(n) = a(2n) = a(3n).
Logarithmic since a(b*c) = a(b) + a(c).
Coincidentally, a(n) = A101040(n+78) for 1 < n < 20.

Examples

			a(24) = 0 since 24 = 2*2*2*3.
a(25) = 2 since 25 = 5*5.
a(26) = 1 since 26 = 2*13.
		

Crossrefs

Programs

  • Haskell
    a106799 = a001222 . a065330  -- Reinhard Zumkeller, Nov 19 2015
    
  • Mathematica
    a[n_] := PrimeOmega[n] - IntegerExponent[n, 2] - IntegerExponent[n, 3]; Array[a, 100] (* Amiram Eldar, Jan 16 2022 *)
  • PARI
    a(n) = bigomega(n) - valuation(n, 2) - valuation(n, 3); \\ Michel Marcus, Jan 16 2022

Formula

a(n) = A001222(n) - A007814(n) - A007949(n) = A087436(n) - A007949(n).
a(n) = A001222(A065330(n)). - Reinhard Zumkeller, May 19 2005

A349438 Dirichlet convolution of A000027 with A349348 (Dirichlet inverse of A252463), where A252463 shifts the prime factorization of odd numbers one step towards smaller primes and divides even numbers by two.

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 2, 1, 3, 0, 4, -1, 2, 0, 2, 1, 4, -1, 2, -2, 2, 0, 4, -2, 10, 0, 9, -2, 6, -4, 2, 1, 4, 0, 4, -4, 6, 0, 2, -4, 4, -4, 2, -4, 6, 0, 4, -3, 14, -4, 4, -2, 6, -6, 8, -4, 2, 0, 6, -6, 2, 0, 6, 1, 4, -8, 6, -4, 4, -8, 4, -6, 2, 0, 10, -2, 8, -4, 6, -6, 27, 0, 4, -6, 8, 0, 6, -8, 6, -16, 4, -4, 2, 0, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2021

Keywords

Comments

Convolving this sequence with A348045 gives Euler phi, A000010.
It might first seem that A000265(a(p^k)) = p^(k-1) for all odd primes and all exponents k >= 1, but this does not hold for prime 37. However, with p=37, identity A065330(A349438(37^k)) = 37^(k-1) seems to hold for all exponents k >= 1. - Antti Karttunen, Nov 20 2021

Crossrefs

Cf. A000027, A064989, A252463, A349348, A349437 (Dirichlet inverse), A349439 (sum with it).

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p, -1]^e; s[1] = 1; s[n_] := If[EvenQ[n], n/2, Times @@ f @@@ FactorInteger[n]]; sinv[1] = 1; sinv[n_] := sinv[n] = -DivisorSum[n, sinv[#] * s[n/#] &, # < n &]; a[n_] := DivisorSum[n, # * sinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    memoA349348 = Map();
    A349348(n) = if(1==n,1,my(v); if(mapisdefined(memoA349348,n,&v), v, v = -sumdiv(n,d,if(dA252463(n/d)*A349348(d),0)); mapput(memoA349348,n,v); (v)));
    A349438(n) = sumdiv(n,d,d*A349348(n/d));

Formula

a(n) = Sum_{d|n} d * A349348(n/d).

A146892 For definition see comments lines.

Original entry on oeis.org

1, 6, 6, 72, 72, 72, 6, 72, 72, 5184, 6, 5184, 72, 5184, 31104, 5184, 5184, 5184, 2592, 5184, 432, 373248, 36, 373248, 31104, 26873856, 26873856, 26873856, 373248, 31104, 36, 31104, 2239488, 2239488, 1934917632, 26873856, 31104, 2239488
Offset: 0

Views

Author

Yasutoshi Kohmoto, Apr 17 2009

Keywords

Comments

Let USigma denote the unitary sigma function, A034448.
As in A146891, let PF_p(n) denote the largest power of the prime p dividing n. PF_2 is A006519, and PF_3 is A038500. Furthermore define PF_1(n)=1.
Extension to multi-prime-indices is done by multiplying the corresponding functions: PF_{p,q,..}(n) = PF_p(n)*PF_q(n)*... An example of this is PF_{2,3} = A065331.
[How to compute c(m)]
Case of Base Primes = {2}{3}
c(0)=2^m, b(0)=2^m
c(n)=c(n-1)/PF_2[USigma[b(n-1)]]*PF_3[USigma[b(n-1)]]
b(n)=USigma[b(n-1)]/ PF_2,3[USigma[b(n-1)]]
IF b(k)=1 THEN END
a(m)=c(k)
Sequence gives a(m)
Factorization of term becomes 2^r*3^s.

Crossrefs

Cf. A146891.

Programs

Extensions

More terms from R. J. Mathar, Jun 24 2009
Previous Showing 11-20 of 31 results. Next