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-10 of 152 results. Next

A297167 a(1) = 0, for n > 1, a(n) = -1 + the excess of n (A046660) + the index of the largest prime factor (A061395).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 27 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Array[-1 + PrimeOmega@ # - PrimeNu@ # + PrimePi[FactorInteger[#][[-1, 1]]] /. k_ /; k < 0 -> 0 &, 105] (* or, slightly faster *)
    Array[-1 + Length@ # - Length@ Union@ # + PrimePi@ Last@ # /. k_ /; k < 0 -> 0 &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, #] &@ FactorInteger[#] &, 105] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After M. F. Hasler's code for A006530.
    A252464(n) = if(1==n, 0, (bigomega(n) + A061395(n) - 1));
    A297167(n) = (A252464(n) - omega(n));
    \\ Or just as:
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    \\ Antti Karttunen, Mar 13 2018
    
  • Python
    from sympy import factorint, primepi
    def A297167(n): return primepi(max(f:=factorint(n)))+sum(e-1 for e in f.values())-1 if n>1 else 0 # Chai Wah Wu, Jul 29 2023
  • Scheme
    (define (A297167 n) (- (A252464 n) (A001221 n)))
    

Formula

a(n) = A252464(n) - A001221(n).
For n > 1, a(n) = A033265(A156552(n)) = A297113(n) - 1.
For n > 1, a(n) = A046660(n) + A061395(n) - 1. - Antti Karttunen, Mar 13 2018

Extensions

Name changed, original equivalent definition is the first entry in the Formula section - Antti Karttunen, Mar 13 2018

A257851 Triangle read by rows: row n contains the first n+1 numbers m such that A046660(m) = n.

Original entry on oeis.org

1, 4, 9, 8, 24, 27, 16, 48, 72, 80, 32, 96, 144, 160, 216, 64, 192, 288, 320, 432, 448, 128, 384, 576, 640, 864, 896, 1296, 256, 768, 1152, 1280, 1728, 1792, 2592, 2816, 512, 1536, 2304, 2560, 3456, 3584, 5184, 5632, 6400, 1024, 3072, 4608, 5120, 6912, 7168, 10368, 11264, 12800, 13312
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 29 2015

Keywords

Comments

At the suggestion of Michel Marcus's remark in Carlos Eduardo Olivieri's A261256.

Examples

			0:    1
1:    4     9
2:    8    24      27
3:   16    48      72    80
4:   32    96     144   160     216
5:   64   192     288   320     432   448
6:  128   384     576   640     864   896    1296
7:  256   768    1152  1280    1728  1792    2592   2816
8:  512  1536    2304  2560    3456  3584    5184   5632    6400
--  ------------------------------------------------------------
0:  1
1:  2^2   3^2
2:  2^3 2^3*3     3^3
3:  2^4 2^4*3 2^3*3^2 2^4*5
4:  2^5 2^5*3 2^4*3^2 2^5*5 2^3*3^3
5:  2^6 2^6*3 2^5*3^2 2^6*5 2^4*3^3 2^6*7
6:  2^7 2^7*3 2^6*3^2 2^7*5 2^5*3^3 2^7*7 2^4*3^4
7:  2^8 2^8*3 2^7*3^2 2^8*5 2^6*3^3 2^8*7 2^5*3^4 2^8*11
8:  2^9 2^9*3 2^8*3^2 2^9*5 2^7*3^3 2^9*7 2^6*3^4 2^9*11 2^8*5^2
		

Crossrefs

Programs

  • Haskell
    a257851 n k = a257851_tabl !! n !! k
    a257851_row n = a257851_tabl !! n
    a257851_tabl = map
       (\x -> take (x + 1) $ filter ((== x) . a046660) [1..]) [0..]
  • Mathematica
    T[n_] := Reap[For[m = 1; k = 1, k <= n+1, If[PrimeOmega[m] - PrimeNu[m] == n, Sow[m]; k++]; m++]][[2, 1]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Sep 17 2021 *)

Formula

T(n,0) = A151821(n+1);
T(n,n-1) = A261256(n) for n > 0;
T(n,n) = A264959(n).
T(0,0) = A005117(1);
T(1,k) = A060687(k+1), k = 0..1;
T(2,k) = A195086(k+1), k = 0..2;
T(3,k) = A195087(k+1), k = 0..3;
T(4,k) = A195088(k+1), k = 0..4;
T(5,k) = A195089(k+1), k = 0..5;
T(6,k) = A195090(k+1), k = 0..6;
T(7,k) = A195091(k+1), k = 0..7;
T(8,k) = A195092(k+1), k = 0..8;
T(9,k) = A195093(k+1), k = 0..9;
T(10,k) = A195069(k+1), k = 0..10.

A332461 a(n) = Product_{d|n, d>1} A000040(A297113(d)), where A000040(n) gives the n-th prime, and A297113(n) = the excess of n plus the index of the largest dividing prime (A046660 + A061395).

Original entry on oeis.org

1, 2, 3, 6, 5, 18, 7, 30, 15, 50, 11, 270, 13, 98, 75, 210, 17, 450, 19, 1050, 147, 242, 23, 9450, 35, 338, 105, 3234, 29, 11250, 31, 2310, 363, 578, 245, 47250, 37, 722, 507, 57750, 41, 43218, 43, 9438, 2625, 1058, 47, 727650, 77, 2450, 867, 17238, 53, 22050, 605, 210210, 1083, 1682, 59, 8268750, 61, 1922, 8085, 30030
Offset: 1

Views

Author

Antti Karttunen, Feb 22 2020

Keywords

Crossrefs

Programs

  • PARI
    A297113(n) = if(1==n, 0, (primepi(vecmax(factor(n)[, 1])) + (bigomega(n)-omega(n))));
    A332461(n) = if(1==n,1, my(m=1); fordiv(n,d,if(d>1, m *= prime(A297113(d)))); (m));

Formula

a(n) = Product_{d|n, d>1} A000040(A297113(d)).
a(p) = p for all primes p.
For all n >= 0, a(2^n) = A002110(n).
For all n >= 1:
A046523(a(n)) = A324202(n).
A048675(a(n)) = A156552(n).
A097248(a(n)) = A332462(n).

A358817 Numbers k such that A046660(k) = A046660(k+1).

Original entry on oeis.org

1, 2, 5, 6, 10, 13, 14, 21, 22, 29, 30, 33, 34, 37, 38, 41, 42, 44, 46, 49, 57, 58, 61, 65, 66, 69, 70, 73, 75, 77, 78, 80, 82, 85, 86, 93, 94, 98, 101, 102, 105, 106, 109, 110, 113, 114, 116, 118, 122, 129, 130, 133, 135, 137, 138, 141, 142, 145, 147, 154, 157
Offset: 1

Views

Author

Amiram Eldar, Dec 02 2022

Keywords

Comments

First differs from its subsequence A007674 at n=18.
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 5, 38, 369, 3655, 36477, 364482, 3644923, 36449447, 364494215, 3644931537, ... . Apparently, the asymptotic density of this sequence exists and equals 0.36449... .

Crossrefs

Cf. A046660.
Subsequences: A007674, A052213, A085651, A358818.
Similar sequences: A002961, A005237, A006049, A045920.

Programs

  • Mathematica
    seq[kmax_] := Module[{s = {}, e1 = 0, e2}, Do[e2 = PrimeOmega[k] - PrimeNu[k]; If[e1 == e2, AppendTo[s, k - 1]]; e1 = e2, {k, 2, kmax}]; s]; seq[160]
  • PARI
    e(n) = {my(f = factor(n)); bigomega(f) - omega(f)};
    lista(nmax) = {my(e1 = e(1), e2); for(n=2, nmax, e2=e(n); if(e1 == e2, print1(n-1,", ")); e1 = e2);}

A340818 Numerators of a sequence of fractions converging to A340820, the asymptotic density of numbers whose excess of prime divisors (A046660) is even (A162644).

Original entry on oeis.org

5, 7, 41, 3, 197, 229, 5827, 277, 1157, 8382, 268049, 94175911, 964941119, 1929224113, 31529606831, 835346466959, 3398377571053, 52665885581009, 119955940157647877, 34063199364211668943, 315047077264055066629, 199089493729235251718903, 47411489829747180146759
Offset: 1

Views

Author

Amiram Eldar, Jan 22 2021

Keywords

Comments

Let Omega_n(k) be the number of prime divisors of k not exceeding prime(n) counted with multiplicity, and omega_n(k) the number of distinct prime divisors of k not exceeding prime(n). Then, f(n) = a(n)/A340819(n) is the asymptotic density of numbers k such that Omega_n(k) == omega_n(k) (mod 2).
Equivalently, f(n) is the asymptotic density of numbers k such that A046660(d_n(k)) is even, where d_n(k) is the largest prime(n)-smooth divisor of k.

Examples

			The sequence of fractions begins with 5/6, 7/9, 41/54, 3/4, 197/264, 229/308, 5827/7854, 277/374, 1157/1564, 8382/11339, ...
For n=1, Omega_2(k)-omega_2(k) is even for either odd k (A005408), or even k whose binary representation ends in an odd number of zeros (A036554). The disjoint union of these 2 sequences has an asymptotic density 1/2 + 1/3 = 5/6.
		

Crossrefs

Cf. A005408, A036554, A046660, A162644, A340819 (denominators), A340820.

Programs

  • Mathematica
    d[p_] := 1/(p*(p + 1)); delta[n_] := delta[n] = d[Prime[n]]; f[0] = 1; f[n_] := f[n] = f[n - 1] * (1 - delta[n]) + (1 - f[n - 1]) * delta[n]; Numerator @ Array[f, 30]

Formula

Let delta(n) = 1/(prime(n)*(prime(n)+1)) be the asymptotic density of numbers whose prime(n)-adic valuation is positive and even. Let f(0) = 1. Then, f(n) = f(n-1)*(1 - delta(n)) + (1 - f(n))*delta(n).
Limit_{n->oo} f(n) = 0.73584... (A340820).

A340819 Denominators of a sequence of fractions converging to A340820, the asymptotic density of numbers whose excess of prime divisors (A046660) is even (A162644).

Original entry on oeis.org

6, 9, 54, 4, 264, 308, 7854, 374, 1564, 11339, 362848, 127541072, 1307295988, 2614591976, 42742894912, 1132686715168, 4608863185856, 71437379380768, 162734350229389504, 46216555465146619136, 427503138052606227008, 270181983249247135469056, 64347502466822129824768
Offset: 1

Views

Author

Amiram Eldar, Jan 22 2021

Keywords

Comments

See A340818 for details.

Crossrefs

Cf. A046660, A162644, A340818 (numerators), A340820.

Programs

  • Mathematica
    d[p_] := 1/(p*(p + 1)); delta[n_] := delta[n] = d[Prime[n]]; f[0] = 1; f[n_] := f[n] = f[n - 1] * (1 - delta[n]) + (1 - f[n - 1]) * delta[n]; Denominator @ Array[f, 30]

A323253 a(n) is the smallest number k such that factorizations of n consecutive integers starting at k have the same excess of number of primes counted with multiplicity over number of primes counted without multiplicity (A046660).

Original entry on oeis.org

1, 1, 1, 844, 74849, 671346, 8870025
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 30 2019

Keywords

Comments

Smallest number k such that n or more consecutive integers starting at k have the same number of proper prime power divisors.
a(8) > 10^9. - Vaclav Kotesovec, Sep 01 2019
a(8) <= 254023231417746. - David A. Corneth, Sep 01 2019
a(8) > 10^13. - Giovanni Resta, Sep 05 2019

Examples

			671346 = 2 * 3^2 * 13 * 19 * 151,
671347 = 17^2 * 23 * 101,
671348 = 2^2 * 47 * 3571,
671349 = 3 * 7^2 * 4567,
671350 = 2 * 5^2 * 29 * 463,
671351 = 53^2 * 239.
These the first 6 consecutive numbers with the same number of proper prime power divisors, so a(6) = 671346.
		

Crossrefs

Programs

  • Mathematica
    Do[find = 0; k = 0; While[find == 0, k++; If[Length[Union[Table[PrimeOmega[j] - PrimeNu[j], {j, k, k + n - 1}]]] == 1, find = 1; Print[k]]], {n, 1, 5}] (* Vaclav Kotesovec, Sep 01 2019 *)
    (* faster program *) fak = Table[f = FactorInteger[j]; Total[Transpose[f][[2]]] - Length[f], {j, 1, 10000000}]; m = Max[fak]; Table[Min[Table[SequencePosition[fak, ConstantArray[j, n]], {j, 0, m}]], {n, 1, 7}] (* Vaclav Kotesovec, Sep 01 2019 *)
  • PARI
    excess(n) = bigomega(n) - omega(n);
    score(n) = my(t=excess(n)); for(k=1, oo, if(excess(n+k) != t, return(k)));
    upto(nn) = my(n=1); for(k=1, nn, while(score(k) >= n, print1(k, ", "); n++)); \\ Daniel Suteu, Sep 01 2019

Extensions

a(7) from Daniel Suteu and Vaclav Kotesovec, Sep 01 2019

A363919 a(n) = n^excess(n), where excess(n) = A046660(n).

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 1, 64, 9, 1, 1, 12, 1, 1, 1, 4096, 1, 18, 1, 20, 1, 1, 1, 576, 25, 1, 729, 28, 1, 1, 1, 1048576, 1, 1, 1, 1296, 1, 1, 1, 1600, 1, 1, 1, 44, 45, 1, 1, 110592, 49, 50, 1, 52, 1, 2916, 1, 3136, 1, 1, 1, 60, 1, 1, 63, 1073741824, 1, 1, 1, 68
Offset: 1

Views

Author

Keywords

Examples

			108 = 2^2 * 3^3 => excess(108) = 5 - 2 => a(108) = 108^3 = 1259712.
		

Crossrefs

Programs

  • Julia
    using Nemo
    exc(n::fmpz) = sum(e - 1 for (p, e) in factor(n))
    A363919(n::fmpz) = n < 2 ? fmpz(1) : n^exc(n)
    println([A363919(fmpz(n)) for n in 1:68])
    
  • Maple
    with(NumberTheory):
    A363919 := n -> n^(NumberOfPrimeFactors(n) - NumberOfPrimeFactors(n, 'distinct')):
    # Alternative:
    a := n -> local i: n^add(i[2] - 1, i in ifactors(n)[2]): seq(a(n), n = 1..68);
  • Mathematica
    Array[#^(PrimeOmega[#] - PrimeNu[#]) &, 120]
  • PARI
    a(n) = my(f=factor(n)[, 2]); n^(vecsum(f)-#f); \\ Michel Marcus, Jul 16 2023
    
  • Python
    from sympy import factorint
    def A363919(n): return n**sum(map(lambda e:e-1,factorint(n).values())) # Chai Wah Wu, Jul 18 2023
  • SageMath
    def A363919(n):
        if n < 2: return 1
        return n^sum(p[1] - 1 for p in list(factor(n)))
    print([A363919(n) for n in srange(1, 69)])
    

Formula

a(n) = n^(Sum_{p in Factors(n)} (mult(p) - 1)), where Factors(n) is the integer factorization of n and mult(p) the multiplicity of the prime factor p.
a(n) = A363923(n) / A205959(n).
a(n) = n^A046660(n) = n^(A001222(n) - A001221(n)).
a(n) = 1 or divisible by at least one squared prime.
a(n) = 1 <=> n is squarefree (A005117).
a(n) != 1 <=> A056170(n) != 0.
a(n) = n <=> n = A060687(n - 1) for n >= 2.
a(2^n) = 2^(n*(n - 1)) = A053763(n).
a(n) <= 2^(lb(n)*(lb(n)-1)), where lb(n) = floor(log_{2}(n)).
a(n) is even <=> n = 2*A337945(n).
a(n) > 1 is odd <=> n = A053850(n).
n is prime => a(n) = 1. ('prime' means term of A000040).
n is prime product => a(n) = 1. ('prime product' means term of A144338).
n is proper prime power => a(n) is proper prime power. ('proper prime power' means term of A246547).
Moebius(a(n)) = [a(n) = 1], where [ ] denotes the Iverson bracket.

A358818 a(n) is the least number k such that A046660(k) = A046660(k+1) = n.

Original entry on oeis.org

1, 44, 135, 80, 8991, 29888, 123200, 2316032, 1043199, 24151040, 217713663, 689278976, 11573190656, 76876660736, 311969153024, 2035980763136, 2741258240000, 215189482110975
Offset: 0

Views

Author

Amiram Eldar, Dec 02 2022

Keywords

Comments

a(14) <= 314944159743.
a(18) > 10^14.5; a(19) = 275892612890624; a(20) > 10^14.5. - Martin Ehrenstein, Dec 11 2022

Crossrefs

Cf. A046660.
Subsequence of A358817.
Similar sequences: A052215, A059737, A093548, A115186.

Programs

  • Mathematica
    e[n_] := PrimeOmega[n] - PrimeNu[n]; a[n_] := Module[{k = 1}, While[e[k] != n || e[k + 1] != n, k++]; k]; Array[a, 10, 0]
  • PARI
    e(n) = {my(f = factor(n)); bigomega(f) - omega(f)};
    a(n) = {my(k=1); while(e(k) != n || e(k+1) !=n , k++); k};

Extensions

a(14)-a(16) from Martin Ehrenstein, Dec 04 2022
a(17) from Martin Ehrenstein, Dec 09 2022

A369171 Numbers k such that A000688(k) = A046660(k+1).

Original entry on oeis.org

3, 11, 17, 19, 43, 51, 59, 62, 67, 74, 83, 89, 91, 97, 99, 115, 123, 124, 131, 139, 146, 149, 155, 163, 170, 174, 187, 188, 197, 203, 206, 211, 219, 227, 233, 235, 241, 259, 267, 274, 278, 279, 283, 291, 293, 305, 307, 314, 331, 337, 339, 341, 342, 347, 349, 350
Offset: 1

Views

Author

Amiram Eldar, Jan 15 2024

Keywords

Comments

The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 1, 15, 150, 1548, 15499, 154916, 1549105, 15489932, 154901767, 1549014294, ... . From these values the asymptotic density of this sequence, whose existence was proven by Erdős and Ivić (1987) (the constant c in the Formula section), can be empirically evaluated by 0.15490... .

References

  • József Sándor, Dragoslav S. Mitrinovic, Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter XIII, p. 476.

Crossrefs

Programs

  • Mathematica
    Select[Range[350], FiniteAbelianGroupCount[#] == PrimeOmega[#+1] - PrimeNu[#+1] &]
  • PARI
    is(n) = vecprod(apply(numbpart, factor(n)[, 2])) == bigomega(n+1) - omega(n+1);

Formula

The number of terms not exceeding x, N(x) = c * x + O(x^(3/4) * log(x)^4), where c > 0 is a constant (Erdős and Ivić, 1987).
Showing 1-10 of 152 results. Next