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.

A158936 List of coprime pairs (x,y) such that x^2+y^2 = 13^n with 0

Original entry on oeis.org

0, 1, 2, 3, 5, 12, 9, 46, 119, 120, 122, 597, 828, 2035, 4449, 6554, 239, 28560, 56403, 86158, 145668, 341525, 246046, 1315911, 3369960, 3455641, 3627003, 17021162, 23161315, 58317492, 128629846, 186118929, 13651680, 815616479, 1590277918, 2474152797, 4241902555, 9719139348, 6712571031, 37641223154, 95420159401, 99498527400, 107655263398, 485257533003
Offset: 0

Views

Author

Zak Seidov, Apr 10 2011

Keywords

Comments

For n>2, all other solutions (x,y) are divisible by 13, e.g., 26^2+39^2=13^3.

Examples

			n=1: 13^1=2^2+3^2, hence a(1)=2, a(2)=3,
n=2: 13^2=5^2+12^2, hence a(3)=5, a(4)=12.
		

Crossrefs

Cf. A098122 for case x^2+y^2=5^n.
Cf. A188948, A188949 for the values of x and y separately.
Cf. A188982, A188983 for even and odd terms.

Programs

  • Maple
    f:= proc(n) local q;
      q:= map(abs, [Re,Im]((2+3*I)^n));
      op(sort(q))
    end proc:
    map(f, [$0..50]); # Robert Israel, Feb 27 2024
  • Mathematica
    s={2,3};x=2;y=3;Do[A=3x+2y;If[Mod[A,13]==0,A=Abs[3x-2y];B=2x+3y,B=Abs[2x-3y]];x=A;If[A>B,x=B;y=A,y=B];s=Join[s,{x,y}],{20}];s
    Table[Select[PowersRepresentations[13^n, 2, 2], CoprimeQ @@ # &][[1]], {n, 0, 21}] (* T. D. Noe, Apr 12 2011 *)

Formula

a(2*n) = min(|Re((3+2*i)^n)|, |Im((3+2*i)^n)|), a(2*n+1) = max(|Re((3+2*i)^n)|, |Im((3+2*i)^n)|). - Robert Israel, Feb 27 2024

A188983 Odd numbers y such that x^2 + y^2 = 13^n with x and y coprime.

Original entry on oeis.org

1, 3, 5, 9, 119, 597, 2035, 4449, 239, 56403, 341525, 1315911, 3455641, 3627003, 23161315, 186118929, 815616479, 2474152797, 4241902555, 6712571031, 95420159401, 485257533003, 1671083125805, 3718150825791, 584824319281, 44827014819597, 276564805068235, 1076637637754649, 2864483360640839, 3190610873034597, 18094618450123325
Offset: 0

Views

Author

T. D. Noe, Apr 14 2011

Keywords

Comments

The x values are in A188982.
This is also the absolute value of the real part of (3+2i)^n, where i = sqrt(-1). The signed version is A121622.

Crossrefs

Programs

  • Magma
    [Integers()!Abs(Real((3+2*Sqrt(-1))^n)): n in [0..30]]; // Bruno Berselli, May 26 2011
  • Mathematica
    Table[s = Select[PowersRepresentations[13^n, 2, 2], CoprimeQ @@ # &, 1][[1]]; Select[s, OddQ][[1]], {n, 0, 30}]

A348653 For any nonnegative number n with base-13 expansion Sum_{k >= 0} d_k*13^k, a(n) is the imaginary part of Sum_{k >= 0} g(d_k)*(3+2*i)^k where g(0) = 0, and g(1+u+3*v) = (1+u*i)*i^v for any u = 0..2 and v = 0..3 (where i denotes the imaginary unit); see A348652 for the real part.

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 1, 0, -1, -2, -1, -1, -1, 2, 2, 3, 4, 3, 3, 3, 2, 1, 0, 1, 1, 1, 5, 5, 6, 7, 6, 6, 6, 5, 4, 3, 4, 4, 4, 8, 8, 9, 10, 9, 9, 9, 8, 7, 6, 7, 7, 7, 3, 3, 4, 5, 4, 4, 4, 3, 2, 1, 2, 2, 2, 1, 1, 2, 3, 2, 2, 2, 1, 0, -1, 0, 0, 0, -1, -1, 0, 1, 0, 0
Offset: 0

Views

Author

Rémy Sigrist, Oct 27 2021

Keywords

Comments

The function f defines a bijection from the nonnegative integers to the Gaussian integers.
The following diagram depicts g(d) for d = 0..12:
|
| +
| 3
|
+ + + +
6 5 |4 2
|
--------+----+----+-------
7 |0 1
|
+ + + +
8 |10 11 12
|
+ |
9 |

Crossrefs

See A316658 for a similar sequence.

Programs

  • PARI
    g(d) = { if (d==0, 0, (1+I*((d-1)%3))*I^((d-1)\3)) }
    a(n) = imag(subst(Pol([g(d)|d<-digits(n, 13)]), 'x, 3+2*I))

Formula

abs(a(13^k)) = A188982(k).
Showing 1-3 of 3 results.