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

A096019 a(0)=3, a(n) = 3*a(n-1) + 2*(-1)^n.

Original entry on oeis.org

3, 7, 23, 67, 203, 607, 1823, 5467, 16403, 49207, 147623, 442867, 1328603, 3985807, 11957423, 35872267, 107616803, 322850407, 968551223, 2905653667, 8716961003, 26150883007, 78452649023, 235357947067, 706073841203, 2118221523607
Offset: 0

Views

Author

T. D. Noe, Jun 15 2004

Keywords

Comments

The number of Pythagorean quadruples mod 3^n is given by a(n) 3^(2n-1). See A096018.

Crossrefs

Cf. A096018.

Programs

  • Mathematica
    LinearRecurrence[{2,3},{3,7},30] (* Harvey P. Dale, Feb 10 2024 *)

Formula

a(n) = 3^(n+1)-(3^n-(-1)^n)/2.
a(n) = 2*a(n-1)+3*a(n-2). G.f.: (3+x)/((1+x)*(1-3*x)). [Colin Barker, Mar 26 2012]

A316148 Number of non-congruent solutions of x^2+y^2 == z^2+w^2 (mod n).

Original entry on oeis.org

1, 8, 33, 96, 145, 264, 385, 896, 945, 1160, 1441, 3168, 2353, 3080, 4785, 7680, 5185, 7560, 7201, 13920, 12705, 11528, 12673, 29568, 18625, 18824, 26001, 36960, 25201, 38280, 30721, 63488, 47553, 41480, 55825, 90720, 51985, 57608, 77649, 129920, 70561, 101640, 81313
Offset: 1

Views

Author

R. J. Mathar, Jun 25 2018

Keywords

Crossrefs

Programs

  • Maple
    A316148 := proc(n)
        a := 1;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 2 then
                a := a*p^(2*e+1)*(p^e-1) ;
            else
                a := a*p^(2*e-1)*(p^(e+1)+p^e-1) ;
            end if;
        end do:
        a ;
    end proc:
    seq(A316148(n),n=1..100) ;
  • Mathematica
    f[2, e_] :=  2^(2*e+1)*(2^e-1); f[p_, e_] := p^(3*e)+p^(3*e-1)-p^(2*e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 11 2020 *)
  • PARI
    a(n) = {my(f = factor(n), p, e); prod(i = 1, #f~, p = f[i,1]; e = f[i,2]; if(p == 2, 2^(2*e+1)*(2^e-1), p^(3*e)+p^(3*e-1)-p^(2*e-1)));} \\ Amiram Eldar, Dec 18 2023

Formula

Multiplicative with a(2^e) = 2^(2e+1)*(2^e-1), a(p^e) = p^(3e)+p^(3e-1)-p^(2e-1) for odd primes p.
Sum_{k=1..n} a(k) ~ c * n^4 / 4, where c = zeta(2)/zeta(3) = 1.368432... (A306633). - Amiram Eldar, Dec 18 2023

A096020 Number of Pythagorean quintuples mod n; i.e., number of solutions to v^2 + w^2 + x^2 + y^2 = z^2 mod n.

Original entry on oeis.org

1, 16, 81, 192, 625, 1296, 2401, 3072, 6723, 10000, 14641, 15552, 28561, 38416, 50625, 47104, 83521, 107568, 130321, 120000, 194481, 234256, 279841, 248832, 393125, 456976, 544563, 460992, 707281, 810000, 923521, 753664
Offset: 1

Views

Author

T. D. Noe, Jun 15 2004

Keywords

Examples

			x + 16 x^2 + 81 x^3 + 192 x^4 + 625 x^5 + 1296 x^6 + 2401 x^7 + ...
		

Crossrefs

Cf. A062775 (number of solutions to x^2 + y^2 = z^2 mod n), A096018 (number of solutions to w^2 + x^2 + y^2 = z^2 mod n).

Programs

  • Mathematica
    Table[cnt=0; Do[If[Mod[v^2+w^2+x^2+y^2-z^2, n]==0, cnt++ ], {v, 0, n-1}, {w, 0, n-1}, {x, 0, n-1}, {y, 0, n-1}, {z, 0, n-1}]; cnt, {n, 30}]
    a[ n_] := If[ n < 1, 0, Sum[ 1 - Sign[ Mod[ v^2 + w^2 + x^2 + y^2 - z^2, n]], {v, n}, {w, n}, {x, n}, {y, n}, {z, n}]]; (* Michael Somos, Jan 21 2012 *)
Showing 1-3 of 3 results.