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

A303606 Powers of composite squarefree numbers that are not squarefree.

Original entry on oeis.org

36, 100, 196, 216, 225, 441, 484, 676, 900, 1000, 1089, 1156, 1225, 1296, 1444, 1521, 1764, 2116, 2601, 2744, 3025, 3249, 3364, 3375, 3844, 4225, 4356, 4761, 4900, 5476, 5929, 6084, 6724, 7225, 7396, 7569, 7776, 8281, 8649, 8836, 9025, 9261, 10000, 10404, 10648, 11025, 11236
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 26 2018

Keywords

Examples

			196 is in the sequence because 196 = 2^2*7^2.
4900 is in the sequence because 4900 = 2^2*5^2*7^2.
		

Crossrefs

Intersection of A024619 and A072777.
Intersection of A072774 and A126706.
Intersection of A013929 and A182853.

Programs

  • Mathematica
    Select[Range[12000], Length[Union[FactorInteger[#][[All, 2]]]] == 1 && ! SquareFreeQ[#] && ! PrimePowerQ[#] &]
    seq[max_] := Module[{sp = Select[Range[Floor@Sqrt[max]], SquareFreeQ[#] && PrimeNu[#] > 1 &], s = {}}, Do[s = Join[s, sp[[k]]^Range[2, Floor@Log[sp[[k]], max]]], {k, 1, Length[sp]}]; Union@s]; seq[10^4] (* Amiram Eldar, Feb 12 2021 *)
  • Python
    from math import isqrt
    from sympy import mobius, primepi, integer_nthroot
    def A303606(n):
        def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-primepi(x))
        def f(x): return n-3+x+(y:=x.bit_length())-sum(g(integer_nthroot(x,k)[0]) for k in range(2,y))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/((A120944(n)-1)*A120944(n)) = Sum_{k>=2} (zeta(k)/zeta(2*k) - P(k) - 1) = 0.07547719891508850482..., where P(k) is the prime zeta function. - Amiram Eldar, Feb 12 2021

A364054 a(1) = 1; for n > 1, a(n) is the least positive integer not already in the sequence such that a(n) == a(n-1) (mod prime(n-1)).

Original entry on oeis.org

1, 3, 6, 11, 4, 15, 2, 19, 38, 61, 32, 63, 26, 67, 24, 71, 18, 77, 16, 83, 12, 85, 164, 81, 170, 73, 174, 277, 384, 57, 283, 29, 160, 23, 162, 13, 315, 158, 321, 154, 327, 148, 329, 138, 331, 134, 333, 122, 345, 118, 347, 114, 353, 112, 363, 106, 369, 100, 371, 94, 375, 92, 385
Offset: 1

Views

Author

Ali Sada, Oct 19 2023

Keywords

Comments

5 is the smallest positive integer missing from the first 1000 terms. Also in the interval a(100) to a(1000) there are no entries less than 100. (From W. Edwin Clark via SeqFan.)
Comments from N. J. A. Sloane, Oct 22 2023 (Start)
It appears that the graph of this sequence is dominated by pairs of diverging lines, as suggested by the sketch (see link). For example, around step n = 4619, a descending line is changing to a descending line around a(4619) = 65, a companion ascending line is coming to an end near a(4594) = 44518, and a strong ascending line is starting up around a(4620) = 88899.
It would be nice to have more terms, in order to get better estimates of the times t_i where these transitions happen, and heights alpha_i, beta_i, gamma_i where line breaks are.
The only well-defined points are the (t_i, alpha_i) where the descending lines end, as can be seen from the b-file, where the end point a(4619) = 65 is well-defined. The other transitions, where an ascending line changes to a descending line, are less obvious. It would be nice to know more.
Can the t_i and alpha_i sequences be traced back to the start of the sequence? Of course the alpha_i sequence is not monotonic, and in particular we do not know at present if some alpha_i is equal to 5.
(End)
a(28149) = 7. - Chai Wah Wu, Oct 22 2023
Comment from N. J. A. Sloane, Mar 05 2024 (Start):
At present there is no OEIS entry for the inverse sequence, since it is not known if 5 appears here.
The initial values of the inverse sequence are
n.....1..2..3..4..5..6....7.....8..9..10..11... . . .
index.1..7..2..5..?..3..28149..81..?...?...4... . . . (End)

Examples

			For n = 2, prime(2-1) = prime(1) = 2; a(1) = 1, so a(1) mod 2 = 1, so a(2) is the least positive integer == 1 (mod 2) that has not yet appeared; 1 has appeared, so a(2) = 3.
For n = 3, prime(3-1) = 3; a(2) mod 3 = 0, so a(3) is the least unused integer == 0 mod 3, which is 6, so a(3) =  6.
For n = 4, prime(4-1) = 5; a(3) mod 5 = 1, and 6 has already been used, so a(4) = 11.
		

Crossrefs

For a(n-1) (mod prime(n-1)) see A366470.
Records: A368384, A368385.
See also A366475, A366477.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Module[{p = Prime[n - 1], k = 2, s = Array[a, n - 1]}, While[! FreeQ[s, k] || ! Divisible[k - a[n - 1], p], k++]; k]; Array[a, 100] (* Amiram Eldar, Oct 20 2023 *)
    nn = 2^20; c[] := False; m[] := 0; a[1] = j = 1; c[0] = c[1] = True;
      Monitor[Do[p = Prime[n - 1]; r = Mod[j, p];
        While[Set[k, p m[p] + r ]; c[k], m[p]++];
        Set[{a[n], c[k], j}, {k, True, k}], {n, 2, nn}], n];
    Array[a, nn] (* Michael De Vlieger, Oct 26 2023, fast, based on congruence, avoids search *)
  • Python
    from itertools import count, islice
    from sympy import nextprime
    def A364054_gen(): # generator of terms
        a, aset, p = 1, {0,1}, 2
        while True:
            yield a
            for b in count(a%p,p):
                if b not in aset:
                    aset.add(b)
                    a, p = b, nextprime(p)
                    break
    A364054_list = list(islice(A364054_gen(),30)) # Chai Wah Wu, Oct 22 2023

A160135 Sum of non-exponential divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 5, 1, 8, 1, 10, 1, 10, 9, 9, 1, 15, 1, 12, 11, 14, 1, 30, 1, 16, 10, 14, 1, 42, 1, 29, 15, 20, 13, 19, 1, 22, 17, 40, 1, 54, 1, 18, 18, 26, 1, 58, 1, 33, 21, 20, 1, 60, 17, 50, 23, 32, 1, 78, 1, 34, 20, 49, 19, 78, 1, 24, 27, 74, 1, 75, 1, 40, 34, 26, 19, 90, 1, 76, 28
Offset: 1

Views

Author

Jaroslav Krizek, May 02 2009

Keywords

Comments

The non-exponential divisors d|n of a number n = p(i)^e(i) are divisors d not of the form p(i)^s(i), s(i)|e(i) for all i.

Examples

			a(8) = A000203(8) - A051377(8) = 15 - 10 = 5. a(8) = a(2^3) = (2^4-1)/(2-1) - (2^1+2^3) = 5.
		

Crossrefs

Programs

  • Maple
    lpowp := proc(n,p) local e; for e from 0 do if n mod p^(e+1) <> 0 then RETURN(e) ; fi; od: end:
    expdvs := proc(n) local a,d,nfcts,b,f,iseDiv ; a := {} ; nfcts := ifactors(n)[2] ; for d in ( numtheory[divisors](n) minus {1} ) do iseDiv := true; for f in nfcts do b := lpowp(d,op(1,f) ) ; if b = 0 or op(2,f) mod b <> 0 then iseDiv := false; fi; od: if iseDiv then a := a union {d} ; fi; od: a ; end proc:
    A051377 := proc(n) local k ; add( k, k = expdvs(n)) ; end: A160135 := proc(n) if n = 1 then 1; else numtheory[sigma][1](n)-A051377(n) ; fi; end: seq(A160135(n),n=1..120) ; # R. J. Mathar, May 08 2009
  • Mathematica
    esigma[n_] := Times @@ (Sum[First[#]^d, {d, Divisors[Last[#]]}] &) /@ FactorInteger[n]; a[1] = 1; a[n_] := DivisorSigma[1, n] - esigma[n]; Array[a, 100] (* Amiram Eldar, Oct 26 2021 after Jean-François Alcover at A051377 *)
  • PARI
    A051377(n) = { my(f=factor(n)); prod(i=1, #f[, 1], sumdiv(f[i, 2], d, f[i, 1]^d)); }; \\ From A051377
    A160135(n) = if(1==n,n, sigma(n) - A051377(n)); \\ Antti Karttunen, Mar 04 2018

Formula

a(n) = A000203(n) - A051377(n) for n >= 2.
a(1) = 1, a(p) = 1, a(p*q) = 1 + p + q, a(p*q*...*z) = (p + 1)*(q + 1)*...*(z + 1) - p*q*...*z, for p, q,..,z = primes (A000040), p*q = product of two distinct primes (A006881), p*q*...*z = product of k (k > 0) distinct primes (A120944).
a(p^k) = (p^(k+1)-1)/(p-1)- Sum_{d|k} p^d for p = primes (A000040), p^k = prime powers A000961(n>1), k = natural numbers (A000027)>
a(p^q) = 1+(p^1-p^1)+p^2+p^3+...+p^(q-1), for p, q = primes (A000040), p^q = prime powers of primes (A053810).

Extensions

Edited by R. J. Mathar, May 08 2009

A163109 a(n) = phi(tau(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 1, 2, 2, 2, 2, 6, 1, 2, 2, 4, 1, 4, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 2, 4, 2, 2, 1, 4, 1, 2, 2, 6, 2, 4, 1, 2, 2, 4, 1, 4, 1, 2, 2, 2, 2, 4, 1, 4, 4, 2, 1, 4, 2, 2, 2, 4, 1, 4, 2, 2, 2, 2, 2, 4, 1, 2, 2, 6, 1, 4, 1, 4, 4
Offset: 1

Views

Author

Jaroslav Krizek, Jul 20 2009

Keywords

Examples

			a(16) = a(2^(5-1)) = 5-1 = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[EulerPhi[DivisorSigma[0, n]], {n, 1, 80}] (* Carl Najafi, Aug 15 2011 *)
  • PARI
    a(n) = eulerphi(numdiv(n)); \\ Michel Marcus, Aug 22 2015

Formula

a(n) = A000010(A000005(n)). - Charles R Greathouse IV, Aug 11 2009
a(1) = 1, a(p) = 1 for p = primes (A000040), a(p*q) = 2 for p*q = product of two distinct primes (A006881), a(p*q*...*z) = 2^(k-1) for p*q*...*z = product of k (k > 2) distinct primes p, q, ..., z (A120944), a(p^(q-1)) = q - 1 for p, q = primes (A000040).

Extensions

More terms from Carl Najafi, Aug 15 2011
Further extended by Antti Karttunen, Jul 23 2017

A355524 Minimal difference between adjacent prime indices of n > 1, or 0 if n is prime.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 3, 6, 1, 0, 0, 7, 4, 0, 0, 1, 0, 0, 0, 8, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0, 6, 9, 0, 0, 0, 10, 0, 0, 3, 1, 0, 0, 7, 1, 0, 0, 0, 11, 0, 0, 1, 1, 0, 0, 0, 12, 0, 0, 4, 13, 8
Offset: 2

Views

Author

Gus Wiseman, Jul 10 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 3.
		

Crossrefs

Crossrefs found in the link are not repeated here.
Positions of first appearances are A077017 w/o the first term.
Positions of terms > 0 are A120944.
Positions of zeros are A130091.
Triangle A238353 counts m such that A056239(m) = n and a(m) = k.
For maximal difference we have A286470 or A355526.
Positions of terms > 1 are A325161.
If singletons (k) have minimal difference k we get A355525.
Positions of 1's are A355527.
Prepending 0 to the prime indices gives A355528.
A115720 and A115994 count partitions by their Durfee square.
A287352, A355533, A355534, A355536 list the differences of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[PrimeQ[n],0,Min@@Differences[primeMS[n]]],{n,2,100}]

A229276 Composite squarefree numbers n such that p-tau(n) divides n+sigma(n), where p are the prime factors of n, tau(n) = A000005(n) and sigma(n) = A000203(n).

Original entry on oeis.org

6, 10, 15, 66, 145, 231, 435, 1221, 11571, 99093, 105502, 292434, 449854, 585429, 643858, 968014, 1372494, 1787091, 1939434, 4659114, 5524014, 5654334, 6250371, 6974007, 19495374, 19821714, 28488039, 34701369, 46183893, 81133734, 213352233, 230140869
Offset: 1

Views

Author

Paolo P. Lava, Sep 19 2013

Keywords

Comments

Subsequence of A120944.

Examples

			Prime factors of 435 are 3, 5, 29 and sigma(435) = 720, tau(435) = 8.
435 + 720 = 1155 and 1155 / (3 - 8) = -231, 1155 / (5 - 8) = -385, 1155 / (29 - 8) = 55.
		

Crossrefs

Programs

  • Maple
    with (numtheory); P:=proc(q) local a, b, c, i, ok, p, n;
    for n from 2 to q do  if not isprime(n) then a:=ifactors(n)[2]; ok:=1;
    for i from 1 to nops(a) do if a[i][2]>1 or a[i][1]=tau(n) then ok:=0; break;
    else if not type((n+sigma(n))/(a[i][1]-tau(n)), integer) then ok:=0; break; fi; fi; od; if ok=1 then print(n); fi; fi; od; end: P(2*10^6);

Extensions

a(21)-a(33) from Giovanni Resta, Sep 20 2013
First term deleted by Paolo P. Lava, Sep 23 2013

A355525 Minimal difference between adjacent prime indices of n, or k if n is the k-th prime.

Original entry on oeis.org

1, 2, 0, 3, 1, 4, 0, 0, 2, 5, 0, 6, 3, 1, 0, 7, 0, 8, 0, 2, 4, 9, 0, 0, 5, 0, 0, 10, 1, 11, 0, 3, 6, 1, 0, 12, 7, 4, 0, 13, 1, 14, 0, 0, 8, 15, 0, 0, 0, 5, 0, 16, 0, 2, 0, 6, 9, 17, 0, 18, 10, 0, 0, 3, 1, 19, 0, 7, 1, 20, 0, 21, 11, 0, 0, 1, 1, 22, 0, 0, 12
Offset: 2

Views

Author

Gus Wiseman, Jul 10 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 9842 are {1,4,8,12}, with differences (3,4,4), so a(9842) = 3.
		

Crossrefs

Crossrefs found in the link are not repeated here.
Positions of first appearances are 4 followed by A000040.
Positions of 0's are A013929, see also A130091.
Triangle A238709 counts m such that A056239(m) = n and a(m) = k.
For maximal instead of minimal difference we have A286470.
Positions of terms > 1 are A325160, also A325161.
See also A355524, A355528.
Positions of 1's are A355527.
A001522 counts partitions with a fixed point (unproved), ranked by A352827.
A238352 counts partitions by fixed points, rank statistic A352822.
A287352, A355533, A355534, A355536 list the differences of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[PrimeQ[n],PrimePi[n],Min@@Differences[primeMS[n]]],{n,2,100}]

A366825 Numbers of the form p^2 * m, squarefree m > 1, prime p < lpf(m), where lpf(m) = A020639(m).

Original entry on oeis.org

12, 20, 28, 44, 45, 52, 60, 63, 68, 76, 84, 92, 99, 116, 117, 124, 132, 140, 148, 153, 156, 164, 171, 172, 175, 188, 204, 207, 212, 220, 228, 236, 244, 260, 261, 268, 275, 276, 279, 284, 292, 308, 315, 316, 325, 332, 333, 340, 348, 356, 364, 369, 372, 380, 387
Offset: 1

Views

Author

Michael De Vlieger, Dec 15 2023

Keywords

Comments

Proper subset of A126706. Proper subset of A364996.
Prime signature of a(n) is 2 followed by at least one 1.
Numbers of the form A065642(A120944(k)) for some k.
The asymptotic density of this sequence is (6/Pi^2) * Sum_{p prime} (1/p^2) * (Product_{primes q <= p} (q/(q+1))) = 0.155068688392... . - Amiram Eldar, Dec 18 2023

Examples

			a(1) = 12 = 4*3 = p^2 * m, squarefree m > 1; sqrt(4) < lpf(3), i.e., 2 < 3.
a(5) = 45 = 9*5 = p^2 * m, squarefree m > 1; sqrt(9) < lpf(5), i.e., 3 < 5.
Prime powers p^k, k > 2, are not in the sequence since m = p^(k-2) is not squarefree and p = lpf(m).
		

Crossrefs

Programs

  • Mathematica
    Select[Select[Range[500], PrimeOmega[#] > PrimeNu[#] > 1 &], First[#1] == 2 && Union[#2] == {1} & @@ TakeDrop[FactorInteger[#][[All, -1]], 1] &]
  • PARI
    is(n) = {my(e = factor(n)[, 2]); #e > 1 && e[1] == 2 && vecmax(e[2..#e]) == 1;} \\ Amiram Eldar, Dec 18 2023

A158523 Moebius transform of negated primes in factorization of n.

Original entry on oeis.org

1, -3, -4, 6, -6, 12, -8, -12, 12, 18, -12, -24, -14, 24, 24, 24, -18, -36, -20, -36, 32, 36, -24, 48, 30, 42, -36, -48, -30, -72, -32, -48, 48, 54, 48, 72, -38, 60, 56, 72, -42, -96, -44, -72, -72, 72, -48, -96, 56, -90, 72, -84, -54, 108, 72, 96, 80, 90, -60, 144, -62, 96, -96, 96, 84, -144, -68, -108, 96, -144
Offset: 1

Views

Author

Jaroslav Krizek, Mar 20 2009

Keywords

Examples

			a(72) = a(2^3*3^2) = (-1)^3*(2+1)*2^(3-1) * (-1)^2*(3+1)*3^(2-1) = (-12)*12 = -144.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (-1)^e*(p + 1)*p^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 05 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, (-1)^f[i,2]*(f[i,1]+1)*f[i,1]^(f[i,2]-1));} \\ Amiram Eldar, Jan 05 2023

Formula

Multiplicative with a(p^e) = (-1)^e*(p+1)*p^(e-1), e>0. a(1)=1.
a(n) = mu(n) * A061019(n) = A008683(n) * A061019(n) = A061020(n) * A007427(n) = A061020(n) * A007428(n) * A000012(n) = A007427(n) * A000012(n) * A061019(n) = A007428(n) * A000005(n) * A061019(n), where operation * denotes Dirichlet convolution. Dirichlet convolution of functions b(n), c(n) is function a(n) = b(n) * c(n) = Sum_{d|n} b(d)*c(n/d).
Inverse Moebius transform gives A061019.
a(n) = (-1)^A001222(n)*A001615(n).
Apparently the Dirichlet inverse of A048250. - R. J. Mathar, Jul 15 2010
Dirichlet g.f.: zeta(2*s-2)/(zeta(s-1)*zeta(s)). - Amiram Eldar, Jan 05 2023

Extensions

More terms from Antti Karttunen, Nov 26 2024

A177492 Products of squares of 2 or more distinct primes.

Original entry on oeis.org

36, 100, 196, 225, 441, 484, 676, 900, 1089, 1156, 1225, 1444, 1521, 1764, 2116, 2601, 3025, 3249, 3364, 3844, 4225, 4356, 4761, 4900, 5476, 5929, 6084, 6724, 7225, 7396, 7569, 8281, 8649, 8836, 9025, 10404, 11025, 11236, 12100, 12321, 12996, 13225, 13924
Offset: 1

Views

Author

Keywords

Examples

			36=2^2*3^2, 100=2^2*5*2, 196=2^2*7^2,..900=2^2*3^2*5^2,..
		

Crossrefs

Programs

  • Maple
    q:= n-> not isprime(n) and numtheory[issqrfree](n):
    map(x-> x^2, select(q, [$4..120]))[];  # Alois P. Heinz, Aug 02 2024
  • Mathematica
    f1[n_]:=Length[Last/@FactorInteger[n]]; f2[n_]:=Union[Last/@FactorInteger[n]]; lst={};Do[If[f1[n]>1&&f2[n]=={2},AppendTo[lst,n]],{n,0,8!}];lst
    Reap[Do[{p, e} = Transpose[FactorInteger[n]]; If[Length[p]>1 && Union[e]=={2}, Sow[n]], {n, 13225}]][[2, 1]]
    (* Second program *)
    Select[Range[120], And[CompositeQ[#], SquareFreeQ[#]] &]^2 (* Michael De Vlieger, Aug 17 2023 *)
  • Python
    from math import isqrt
    from sympy import primepi, mobius
    def A177492(n):
        def f(x): return n+1+primepi(x)+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n+1, f(n+1)
        while m != k:
            m, k = k, f(k)
        return m**2 # Chai Wah Wu, Aug 02 2024

Formula

a(n) = A120944(n)^2. - R. J. Mathar, Dec 06 2010

Extensions

Definition corrected by R. J. Mathar, Dec 06 2010
Previous Showing 21-30 of 134 results. Next