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

A329920 Smallest k such that 6*k*A121940(n)-1 and 6*k*A121940(n)+1 are twin primes.

Original entry on oeis.org

1, 2, 2, 15, 36, 10, 13, 26, 30, 228, 24, 138, 520, 59, 110, 456, 700, 670, 146, 300, 390, 53, 2335, 340, 159, 340, 65, 475, 785, 1145, 759, 3557, 490, 169, 990, 1527, 704, 3379, 1426, 1927, 2397, 600, 1603, 4809, 9815, 58, 35, 364, 361, 123, 2197, 4054, 1867, 1827, 5048
Offset: 1

Views

Author

Pierre CAMI, Nov 24 2019

Keywords

Examples

			A121940(1)=7, 6*1*7-1=41, 41 and 43 are twin primes so a(1)=1.
A121940(2)=91, 6*2*91-1=1091, 1091 and 1093 are twin primes so a(2)=2.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(pp = 1); forprime (p = 1, nn, if (Mod(p, 6) == +1, pp *= p; my(k=1); while (!isprime(6*k*pp-1) || !isprime(6*k*pp+1), k++); print1(k, ", ");););} \\ Michel Marcus, Nov 25 2019

A160498 Number of cubic primitive Dirichlet characters modulo n.

Original entry on oeis.org

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

Views

Author

Steven Finch, May 15 2009

Keywords

Comments

Also called primitive Dirichlet characters of order 3.
Mobius transform of A060839.
C. David, J. Fearnley & H. Kisilevsky prove that Sum_{k=1..n} a(k) ~ C*n, with C = (11*sqrt(3)/(18*Pi)) * Product_{primes p == 1 (mod 3)} (1 - 2/(p*(p+1))) = 0.3170565167922841205670156...; they credit Cohen, F. Diaz y Diaz, & M. Olivier 2002 (see Proposition 5.2. and Corollary 5.3.). - Charles R Greathouse IV, Aug 26 2009 [corrected by Vaclav Kotesovec, Sep 16 2020]
a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a cubic root of unity: 1, w = (-1 + sqrt(3)*i)/2 or w^2 = (-1 - sqrt(3)*i)/2. - Jianing Song, Feb 27 2019
Every term is 0 or a power of 2. - Jianing Song, Mar 02 2019
From Jianing Song, Apr 03 2021: (Start)
For n >= 2, a(n) is the number of cyclic cubic fields with discriminant n^2. See A343023 for detailed information.
The first occurrence of 2^t is 9*A121940(t-1) for t >= 2. (End)

Examples

			From _Jianing Song_, Mar 02 2019: (Start)
Let w = (-1 + sqrt(3)*i)/2 be one of the primitive 3rd root of unity.
For n = 7, the 2 cubic primitive Dirichlet characters modulo n are [0, 1, w, w^2, w^2, w, 1] and [0, 1, w^2, w, w, w^2, 1], so a(7) = 2.
For n = 9, the 2 cubic primitive Dirichlet characters modulo n are [0, 1, w, 0, w^2, w^2, 0, w, 1] and [0, 1, w^2, 0, w, w, 0, w^2, 1], so a(9) = 2. (End)
		

Crossrefs

Cf. A114643 (number of quadratic primitive Dirichlet characters modulo n), A160499 (number of quartic primitive Dirichlet characters modulo n).
Cf. A060839 (number of solutions to x^3 == 1 (mod n)).

Programs

  • Mathematica
    A060839[n_] := Sum[If[Mod[k^3 - 1, n] == 0, 1, 0], {k, 1, n}]; a[n_] := Sum[ MoebiusMu[n/d]*A060839[d], {d, Divisors[n]}]; Table[a[n], {n, 2, 81}] (* Jean-François Alcover, Jun 19 2013 *)
    f[3, 2] = 2; f[p_, e_] := If[Mod[p, 3] == 1 && e == 1, 2, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^3-1)%d, 0, 1)), 0)) \\ Steven Finch, Jun 09 2009
    
  • PARI
    A005088(n)=my(f=factor(n)[,1]); sum(i=1,#f,f[i]%3==1)
    A060839(n)=3^((n%9==0)+A005088(n))
    a(n)=sumdiv(n,d,moebius(n/d)*A060839(d)) \\ Charles R Greathouse IV, Aug 26 2009
    
  • PARI
    a(n) = my(L=factor(n), w=omega(n)); for(i=1, w, if(!((L[i, 1]%3==1 && L[i, 2]==1) || L[i, 1]^L[i, 2] == 9), return(0))); 2^w \\ Jianing Song, Apr 03 2021

Formula

Multiplicative with a(p^e) = 2 if p^e = 9 or p == 1 (mod 3) and e = 1, otherwise 0. - Jianing Song, Mar 02 2019
a(n) = 2*A343023(n) for n >= 2. - Jianing Song, Apr 03 2021

Extensions

a(1) = 1 prepended by Jianing Song, Feb 27 2019

A005088 Number of primes = 1 mod 3 dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The first instance of a(n)=2 is for n=91; the first instance of a(n)=3 is for n=1729. 1729 is famously Ramanujan's taxi cab number -- see A001235. - Harvey P. Dale, Jun 25 2013

Crossrefs

Cf. A121940 (first number having n such factors).

Programs

Formula

Additive with a(p^e) = 1 if p = 1 (mod 3), 0 otherwise.
From Antti Karttunen, Jul 10 2017: (Start)
a(1) = 0; for n > 1, ((A020639(n) mod 3) mod 2) + a(A028234(n)).
a(n) = A001221(n) - A005090(n) - A079978(n).
(End)

A335895 Middle side of primitive triples, in nondecreasing order, for integer-sided triangles whose angles A < B < C are in arithmetic progression.

Original entry on oeis.org

7, 7, 13, 13, 19, 19, 31, 31, 37, 37, 43, 43, 49, 49, 61, 61, 67, 67, 73, 73, 79, 79, 91, 91, 91, 91, 97, 97, 103, 103, 109, 109, 127, 127, 133, 133, 133, 133, 139, 139, 151, 151, 157, 157, 163, 163, 169, 169, 181, 181, 193, 193, 199, 199, 211, 211, 217, 217, 217, 217
Offset: 1

Views

Author

Bernard Schott, Jul 04 2020

Keywords

Comments

Equivalently, lengths of the middle side b of primitive non-equilateral triangles that have an angle of Pi/3; indeed, this side is opposite to angle B = Pi/3.
Also solutions b of the Diophantine equation b^2 = a^2 - a*c + c^2 with a < b and gcd(a,b) = 1.
For the corresponding primitive triples and miscellaneous properties and references, see A335893.
When (a, b, c) is a triple or a solution, then (c-a, b, c) is another solution, so every b in the data is present an even number of times (see examples).
From Bernard Schott, Apr 02 2021: (Start)
Terms are primes of the form 6k+1, or products of primes of the form 6k+1. Three observations:
-> The lengths b are in A004611 \ {1} without repetition, 1 corresponds to the equilateral triangle (1, 1, 1).
-> Every term appears 2^k (k>0) times consecutively and the smallest term that appears 2^k times is precisely A121940(k); see examples.
-> The terms that appear precisely twice consecutively are in A133290. (End)

Examples

			b = 7 appears twice because A121940(1) = 7 and:
  7^2 = 3^2 - 3*8 + 8^2, with triple (3, 7, 8),
  7^2 = 5^2 - 5*8 + 8^2, with triple (5, 7, 8).
b = 91 appears four times because A121940(2) = 91 and:
  91^2 = 11^2 - 11*96 + 96^2, with triple (11, 91, 96),
  91^2 = 85^2 - 85*96 + 96^2, with triple (85, 91, 96),
  91^2 = 19^2 - 19*99 + 99^2, with triple (19, 91, 99),
  91^2 = 80^2 - 80*99 + 99^2, with triple (80, 91, 99).
b = 1729 appears eight times because A121940(3) = 1729 and the triples of these 2^3 = 8 triangles are (96, 1729, 1775), (1679, 1729, 1775), (249, 1729, 1840), (1591, 1729, 1840), (656, 1729, 1961), (1305, 1729, 1961), (799, 1729, 1984), (1185, 1729, 1984).
		

Crossrefs

Cf. A335893 (triples), A335894 (smallest side), this sequence (middle side), A335896 (largest side), A335897 (perimeter).

Programs

  • Maple
    for b from 3 to 100 by 2 do
    for a from 1 to b-1 do
    c := (a+ sqrt(4*b^2-3*a^2))/2;
    if igcd(a, b) = 1 and issqr(4*b^2-3*a^2) then print(b); end if;
    end do;
    end do;
  • PARI
    lista(nn) = {forstep(b=1, nn, 2, for(a=1, b-1, if (gcd(a, b) == 1, my(d = 4*b^2 - 3*a^2); if (issquare(d), my(c = (a + sqrtint(d))/2); if (denominator(c)==1, print1(b, ", "));););););} \\ Michel Marcus, Jul 05 2020

Formula

a(n) = A335893(n, 2).
b is such that b^2 = a^2 - a*c + c^2 with gcd(a,b) = 1 and a < b.

A343023 Number of cyclic cubic fields with discriminant n^2.

Original entry on oeis.org

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

Views

Author

Jianing Song, Apr 02 2021

Keywords

Comments

Equivalently, number of cubic fields with discriminant n^2. That is to say, it makes no difference if the word "cyclic" is omitted from the title.
Let D be a discriminant of a cubic field F, then F is a cyclic cubic field if and only if D is a square. For D = k^2, k must be of the form (p_1)*(p_2)*...*(p_t) or 9*(p_1)*(p_2)*...*(p_{t-1}) with distinct primes p_i == 1 (mod 3), in which case there are exactly 2^(t-1) = 2^(omega(k)-1) (cyclic) cubic fields with discriminant D. See Page 17, Theorem 2.7 of the Ka Lun Wong link.
Each term is 0 or a power of 2.
The first occurrence of 2^t is 9*A121940(t) for t >= 1.

Examples

			a(7) = 1 since there is only 1 (cyclic) cubic field with discriminant 7^2 = 49 is Q[x]/(x^3 - x^2 + x + 1).
a(63) = 2 since there are 2 (cyclic) cubic fields with discriminant 63^2 = 3969: Q[x]/(x^3 - 21x - 28) and Q[x]/(x^3 - 21x - 35).
a(819) = 4 since there are 4 (cyclic) cubic fields with discriminant 819^2 = 670761: Q[x]/(x^3 - 273x - 91), Q[x]/(x^3 - 273x - 728), Q[x]/(x^3 - 273x - 1547) and Q[x]/(x^3 - 273x - 1729).
a(35) = 0 since it is not of form (p_1)*(p_2)*...*(p_t) or 9*(p_1)*(p_2)*...*(p_{t-1}) with distinct primes p_i == 1 (mod 3). Indeed, there are no (cyclic) cubic fields with discriminant 35^2 = 1225.
		

Crossrefs

Cf. A160498, A121940, A343000 (discriminants of cyclic cubic fields), A343001 (indices of positive terms).

Programs

  • PARI
    a(n) = if(n<=1, 0, my(L=factor(n), w=omega(n)); for(i=1, w, if(!((L[i, 1]%3==1 && L[i, 2]==1) || L[i, 1]^L[i, 2] == 9), return(0))); 2^(w-1))

Formula

a(n) = A160498(n)/2 for n > 1.

A319443 Number of distinct Eisenstein primes in the factorization of n.

Original entry on oeis.org

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

Views

Author

Jianing Song, Sep 19 2018

Keywords

Comments

Equivalent of omega (A001221) in the ring of Eisenstein integers.
z is an Eisenstein prime iff z has prime norm or z is the product of a rational prime congruent to 2 modulo 3 and an Eisenstein unit (one of +-1 or (+-1 +- sqrt(3)*i)/2).
Associated Eisenstein prime divisors are counted only once.
Let s(n) be the smallest k with a(k) = n, then we have: s(0) = 1, s(1) = 2, s(2) = 6, s(2n-1) = 2*A121940(n-1), s(2n) = 6*A121940(n-1).

Examples

			Let w = (1 + sqrt(3)*i)/2, w' = (1 - sqrt(3)*i)/2.
Over the Gaussian integers, 5187 = 3*7*13*19 is factored as w'*(1 + w)^2*(2 + w)*(2 + w')*(3 + w)*(3 + w')*(3 + 2w)*(3 + 2w'), the distinct Eisenstein prime factors are 1 + w, 2 + w, 2 + w', 3 + w, 3 + w', 3 + 2w and 3 + 2w', so a(5187) = 7.
Over the Gaussian integers, 1006655265000 = 2^3*3^2*5^4*7^5*11^3 is factored as w'^2*(1 + w)^4*2^3*(2 + w)*(2 + w')*5^4*11^3, the distinct Eisenstein prime factors are 1 + w, 2, 2 + w, 2 + w', 5 and 11, so a(1006655265000) = 6.
		

Crossrefs

Cf. A121940.
Equivalent of arithmetic functions in the ring of Eisenstein integers (the corresponding functions in the ring of integers are in the parentheses): A319442 ("d", A000005), A319449 ("sigma", A000203), A319445 ("phi", A000010), A319446 ("psi", A002322), this sequence ("omega", A001221), A319444 ("Omega", A001222), A319448 ("mu", A008683).
Equivalent in the ring of Gaussian integers: A086275.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 3] == 1, 2, 1]; eisOmega[1] = 0; eisOmega[n_] := Plus @@ f @@@ FactorInteger[n]; Array[eisOmega, 100] (* Amiram Eldar, Feb 10 2020 *)
  • PARI
    a(n)=my(f=factor(n)[, 1]); sum(i=1, #f, if(f[i]%3==1, 2, 1))

Formula

Additive with a(p^e) = 2 if p == 1 (mod 3), 1 otherwise.

A193869 Smallest product of n distinct primes of the form n*k + 1.

Original entry on oeis.org

2, 15, 1729, 32045, 60551711, 85276009, 52814801041129, 1312422595226609, 1130308388231798179, 4182230628909121261, 100166053986652515419641469, 1898732717895963155960377, 1011844196551535741726366525322443
Offset: 1

Views

Author

Omar E. Pol, Sep 01 2011

Keywords

Comments

Also the row products of triangle A077316.
Note that a(3) = 1729 is known as the Hardy-Ramanujan number.

Examples

			a(1) = 2
a(2) = 3*5 = 15
a(3) = 7*13*19 = 1729
a(4) = 5*13*17*29 = 32045
a(5) = 11*31*41*61*71 = 60551711
a(6) = 7*13*19*31*37*43 = 85276009
		

Crossrefs

Programs

  • Maple
    Tj := proc(n,k) option remember: local j,p: if(k=0)then return 0:fi: for j from procname(n,k-1)+1 do if(isprime(n*j+1))then return j: fi: od: end: A193869 := proc(n) return mul(n*Tj(n,k)+1,k=1..n): end: seq(A193869(n),n=1..15); # Nathaniel Johnston, Sep 02 2011

Extensions

a(7)-a(14) from Nathaniel Johnston, Sep 02 2011

A357277 Largest side c of primitive triples, in nondecreasing order, for integer-sided triangles with angles A < B < C = 2*Pi/3 = 120 degrees.

Original entry on oeis.org

7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 91, 97, 103, 109, 127, 133, 133, 139, 151, 157, 163, 169, 181, 193, 199, 211, 217, 217, 223, 229, 241, 247, 247, 259, 259, 271, 277, 283, 301, 301, 307, 313, 331, 337, 343, 349, 361, 367, 373, 379, 397, 403, 403, 409, 421, 427, 427, 433, 439, 457
Offset: 1

Views

Author

Bernard Schott, Oct 01 2022

Keywords

Comments

For the corresponding primitive triples and miscellaneous properties and references, see A357274.
Solutions c of the Diophantine equation c^2 = a^2 + a*b + b^2 with gcd(a,b) = 1 and a < b.
Also, side c can be generated with integers u, v such that gcd(u,v) = 1 and 0 < v < u, c = u^2 + u*v + v^2.
Some properties:
-> Terms are primes of the form 6k+1, or products of primes of the form 6k+1.
-> The lengths c are in A004611 \ {1} without repetition, in increasing order.
-> Every term appears 2^(k-1) (k>=1) times consecutively.
-> The smallest term that appears 2^(k-1) times is precisely A121940(k): see examples.
-> The terms that appear only once in this sequence are in A133290.
-> The terms are the same as in A335895 but frequency is not the same: when a term appears m times consecutively here, it appears 2m times consecutively in A335895. This is because if (a,b,c) is a primitive 120-triple, then both (a,a+b,c) and (a+b,b,c) are 60-triples in A335893 (see Emrys Read link, lemma 2 p. 302).
Differs from A088513, the first 20 terms are the same then a(21) = 151 while A088513(21) = 157.
A050931 gives all the possible values of the largest side c, in increasing order without repetition, for all triangles with an angle of 120 degrees, but not necessarily primitive.

Examples

			c = 7 appears once because A121940(1) = 7 with triple (3,5,7) and 7^2 = 3^2 + 3*5 + 5^2.
c = 91 is the smallest term to appear twice because A121940(2) = 91 with primitive 120-triples (11, 85, 91) and (19, 80, 91).
c = 1729 is the smallest term to appear four times because A121940(3) = 1729 with triples (96, 1679, 1729), (249, 1591, 1729), (656, 1305, 1729), (799, 1185, 1729).
		

Crossrefs

Cf. A357274 (triples), A357275(smallest side), A357276 (middle side), A357278 (perimeter).

Programs

  • Maple
    for c from 5 to 500 by 2 do
    for a from 3 to c-2 do
    b := (-a + sqrt(4*c^2-3*a^2))/2;
    if b=floor(b) and gcd(a, b)=1 and a
    				

Formula

a(n) = A357274(n, 3).

A057130 Product of first n primes of form 6k-1.

Original entry on oeis.org

5, 55, 935, 21505, 623645, 25569445, 1201763915, 63693487495, 3757915762205, 266812019116555, 22145397586674065, 1970940385213991785, 199064978906613170285, 21299952743007609220495, 2406894659959859841915935, 315303200454741639290987485
Offset: 1

Author

Henry Bottomley, Aug 11 2000

Keywords

Examples

			a(3) = 5*11*17 = 935.
a(4) = 21505 = 5 * 11 * 17 * 23.
		

Programs

  • PARI
    lista(nn) = {pp = 1; for (n = 1, nn, p = prime(n); if (Mod(p, 6) == -1, pp *= p; print1(pp, ", ")););} \\ Michel Marcus, Sep 08 2013

Formula

a(n) = a(n-1)*A007528(n) = (A057131(n)+1)/6.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 06 2000
More terms from Michel Marcus, Sep 08 2013

A193873 Smallest product of three distinct primes of the form n*k+1.

Original entry on oeis.org

30, 105, 1729, 1105, 13981, 1729, 88537, 50881, 51319, 13981, 137149, 29341, 548497, 88537, 285541, 186337, 3372529, 51319, 18326641, 252601, 1152271, 137149, 1809641, 1366633, 3828001, 548497, 4814857, 645569, 4797703, 285541, 79230049, 4811297
Offset: 1

Author

Omar E. Pol, Sep 02 2011

Keywords

Comments

Note that the Hardy-Ramanujan number is the first and the smallest repeated number: a(3) = a(6) = 1729.

Examples

			a(1) =  2*3*5 = 30
a(2) =  3*5*7 = 105
a(3) =  7*13*19 = 1729
a(4) =  5*13*17 = 1105
a(5) = 11*31*41 = 13981
		

Programs

  • Mathematica
    a[n_] := Module[{s = {}, c = 0, m = n + 1}, While[c < 3, While[!PrimeQ[m], m += n]; c++; AppendTo[s, m]; m += n]; Times @@ s]; Array[a, 100] (* Amiram Eldar, Jan 17 2025 *)
  • PARI
    a(n)=my(p,q,k=1);while(!isprime(k+=n),);p=k;while(!isprime(k+=n),);q=k;while(!isprime(k+=n),);p*q*k \\ Charles R Greathouse IV, Sep 03 2011
Showing 1-10 of 12 results. Next