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-2 of 2 results.

A000086 Number of solutions to x^2 - x + 1 == 0 (mod n).

Original entry on oeis.org

1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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, 2, 0, 0, 0, 2, 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, 4, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Number of elliptic points of order 3 for Gamma_0(n).
Equivalently, number of fixed points of Gamma_0(n) of type rho.
Values are 0 or a power of 2.
Shadow transform of central polygonal numbers A002061. - Michel Marcus, Jun 06 2013
Empirical: a(n) == A001615(n) (mod 3) for all natural numbers n. - John M. Campbell, Apr 01 2018
From Jianing Song, Jul 03 2018: (Start)
The comment above is true. Since both a(n) and A001615(n) are multiplicative we just have to verify that for prime powers. Note that A001615(p^e) = (p+1)*p^(e-1). For p == 1 (mod 3), p+1 == 2 (mod 3) so (p+1)*p^(e-1) == 2 (mod 3); for p == 2 (mod 3), p+1 is a multiple of 3 so (p+1)*p^(e-1) == 0 (mod 3). For p = 3, if e = 1 then p+1 == 1 (mod 3); if e > 1 then (p+1)*p^(e-1) == 0 (mod 3).
Equivalently, number of solutions to x^2 + x + 1 == 0 (mod n). (End)

Examples

			G.f. = x + x^3 + 2*x^7 + 2*x^13 + 2*x^19 + 2*x^21 + 2*x^31 + 2*x^37 + 2*x^39 + ...
		

References

  • Bruno Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 101.
  • Goro Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see p. 25, Eq. (3).

Crossrefs

Cf. A341422 (without zeros).

Programs

  • Haskell
    a000086 n = if n `mod` 9 == 0 then 0
      else product $ map ((* 2) . a079978 . (+ 2)) $ a027748_row $ a038502 n
    -- Reinhard Zumkeller, Jun 23 2013
  • Maple
    with(numtheory); A000086 := proc (n) local d, s; if modp(n,9) = 0 then RETURN(0) fi; s := 1; for d in divisors(n) do if isprime(d) then s := s*(1+eval(legendre(-3,d))) fi od; s end: # Gene Ward Smith, May 22 2006
  • Mathematica
    Array[ Function[ n, If[ EvenQ[ n ] || Mod[ n, 9 ]==0, 0, Count[ Array[ Mod[ #^2-#+1, n ]&, n, 0 ], 0 ] ] ], 84 ]
    a[ n_] := If[ n < 1, 0, Length[ Select[ (#^2 - # + 1)/n & /@ Range[n], IntegerQ]]]; (* Michael Somos, Aug 14 2015 *)
    a[n_] := a[n] = Product[{p, e} = pe; Which[p==1 || p==3 && e==1, 1, p==3 && e>1, 0, Mod[p, 3]==1, 2, Mod[p, 3]==2, 0, True, a[p^e]], {pe, FactorInteger[n]}]; Array[a, 105] (* Jean-François Alcover, Oct 18 2018 *)
  • PARI
    {a(n) = if( n<1, 0, sum( x=0, n-1, (x^2 - x + 1)%n==0))}; \\ Nov 15 2002
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, if( p==3, 1 + X, if( p%3==2, 1, (1 + X) / (1 - X)))) [n])}; \\ Nov 15 2002
    

Formula

Multiplicative with a(p^e) = 1 if p = 3 and e = 1; 0 if p = 3 and e > 1; 2 if p == 1 (mod 3); 0 if p == 2 (mod 3). - David W. Wilson, Aug 01 2001
a(A226946(n)) = 0; a(A034017(n)) > 0. - Reinhard Zumkeller, Jun 23 2013
a(2*n) = a(3*n + 2) = a(9*n) = a(9*n + 6) = 0. - Michael Somos, Aug 14 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*sqrt(3)/(3*Pi) = 0.367552... (A165952). - Amiram Eldar, Oct 11 2022

A034017 Numbers that are primitively represented by x^2 + xy + y^2.

Original entry on oeis.org

0, 1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 49, 57, 61, 67, 73, 79, 91, 93, 97, 103, 109, 111, 127, 129, 133, 139, 147, 151, 157, 163, 169, 181, 183, 193, 199, 201, 211, 217, 219, 223, 229, 237, 241, 247, 259, 271, 273, 277, 283, 291, 301, 307, 309, 313, 327, 331
Offset: 1

Views

Author

Keywords

Comments

Gives the location of the nonzero terms of A000086.
Starting at a(3), a(n)^2 is the ordered semiperimeter of primitive integer Soddyian triangles (see A210484). - Frank M Jackson, Feb 04 2013
A000086(a(n)) > 0; a(n) = A004611(k) or a(n) = 3*A004611(k) for n > 3 and an appropriate k. - Reinhard Zumkeller, Jun 23 2013
The number of structure units in an icosahedral virus is 20*a(n), see Stannard link. - Charles R Greathouse IV, Nov 03 2015
From Wolfdieter Lang, Apr 09 2021: (Start)
The positive definite binary quadratic form F = [1, 1, 1], that is x^2 + x*y + y^2, has discriminant Disc = -3, and class number 1 (see Buell, Examples, p. 19, first line: Delta = -3, h = 1). This reduced form is equivalent to the form [1,-1, 1], but to no other reduced one (see Buell, Theorem 2.4, p. 15).
This form F represents a positive integer k (= a(n)) properly if and only if A002061(j+1) = 2*T(j) + 1 = j^2 + j + 1 == 0 (mod k), for j from {0, 1, ..., k-1}. This congruence determines the representative parallel primitive forms (rpapfs) of discriminant Disc = -3 and representation of a positive integer number k, given by [k, 2*j+1, c(j)], and c(j) is determined from Disc =-3 as c(j) = ((2*j+1)^2 + 3)/(4*k) = (j^2 + j + 1)/k. Each rpapf has a first reduced form, the so-called right neighbor form, namely [1, 1, 1] for k = 1 = a(1) (the already reduced parallel form from j = 0), and [1, -1, 1] for k = a(n), with n >= 2.
Only odd numbers k are eligible for representation, because 2*T(j) + 1, with the triangular numbers T = A000217, is odd. The odd k with at least one solution of the congruence are then the members of the present sequence.
The solutions of the reduced forms F = [1, 1, 1] and F' = [1, -1, 1] representing k are related by type I equivalence because of the first two entries ([a, a, c] == [a, -a, c]), and also by type II equivalence because [a, b, a] == [a, -b, a], for positive b. These transformation matrices are R_I = Matrix([1, -1],[0, 1]) and R_{II} = Matrix([0, -1], [1, 0]), respectively, to obtain the forms with negative second entry from the ones with positive second entry. The corresponding solutions (x, y)^t (t for transposed) are related by the inverse of these matrices.
The table with the A341422(n) solutions j of the congruence given above are given in A343232. (End)
Apparently, also the integers k that can be expressed as a quotient of two terms from A002061. - Martin Becker, Aug 14 2022
For some x, y let a(n) = r, x*(x+y) = s, y*(x+y) = t, x*y = u then (r,s,t,u) is a Pythagorean quadruple such that r^2 = s^2 + t^2 + u^2. - Frank M Jackson, Feb 26 2024

References

  • B. C. Berndt and R. A. Rankin, Ramanujan: Letters and Commentary, see p. 184, AMS, Providence, RI, 1995.
  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, pp. 15, 19.

Crossrefs

Cf. A000217, A002061, A002476, A003136, A007645 (primes), A045611, A045897, A226946 (complement), A045897 (subsequence), A341422, A343232.

Programs

  • Haskell
    a034017 n = a034017_list !! (n-1)
    a034017_list = 0 : filter ((> 0) . a000086) [1..]
    -- Reinhard Zumkeller, Jun 23 2013
  • Maple
    N:= 1000: # to get all terms <= N
    P:= select(isprime, [seq(6*n+1, n=1..floor((N-1)/6))]):
    A:= {1,3}:
    for p in P do
      A:= {seq(seq(a*p^k, k=0..floor(log[p](N/a))),a=A)}:
    od:
    sort(convert(A,list)); # Robert Israel, Nov 04 2015
  • Mathematica
    lst = {0}; maxLen = 331; Do[If[Reduce[m^2 + m*n + n^2 == k && m >= n >= 0 && GCD[m, n] == 1, {m, n}, Integers] === False, , AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jan 10 2013 *) (* simplified by T. D. Noe, Feb 05 2013 *)
  • PARI
    is(n)=my(f=factor(n));for(i=1,#f[,1],if(f[i,1]%3!=1 && (f[i,1]!=3 || f[i,2]>1), return(n==0))); 1 \\ Charles R Greathouse IV, Jan 10 2013
    
  • PARI
    list(lim)=if(lim<7, return(select(n->n<=lim, [0,1,3]))); my(v=List([0,1,3])); for(x=1,sqrtint(lim\=1), my(y,t); while(y++Charles R Greathouse IV, Jan 20 2022
    

Formula

Extensions

Extended by Ray Chandler, Jan 29 2009
Showing 1-2 of 2 results.