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.

A069484 a(n) = prime(n+1)^2 + prime(n)^2.

Original entry on oeis.org

13, 34, 74, 170, 290, 458, 650, 890, 1370, 1802, 2330, 3050, 3530, 4058, 5018, 6290, 7202, 8210, 9530, 10370, 11570, 13130, 14810, 17330, 19610, 20810, 22058, 23330, 24650, 28898, 33290, 35930, 38090, 41522, 45002
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 29 2002

Keywords

Comments

Together with A069482(n) and A069486(n) a Pythagorean triangle is formed with area = A069487(n).

Crossrefs

Programs

Formula

a(n) = A001248(n+1) + A001248(n) = A000040(n+1)^2 + A000040(n)^2.
a(n) = A048851(n+1).
a(n) = 2 * A075892(n) for n > 1.

A143850 Numbers of the form (p^2 + q^2)/2, for odd primes p and q.

Original entry on oeis.org

9, 17, 25, 29, 37, 49, 65, 73, 85, 89, 97, 109, 121, 145, 149, 157, 169, 185, 193, 205, 229, 241, 265, 269, 277, 289, 325, 349, 361, 409, 425, 433, 445, 481, 485, 493, 505, 529, 541, 565, 601, 625, 661, 685, 689, 697, 709, 745, 769, 829, 841, 845, 853, 865
Offset: 1

Views

Author

T. D. Noe, Sep 03 2008

Keywords

Comments

The primes in this sequence are listed in A103739.
a(n) mod 4 = 1. See A227697 for related sequence. - Richard R. Forberg, Sep 22 2013
The squares of primes in this sequence form the subsequence A001248 \ {4}. - Bernard Schott, Jul 09 2022

Crossrefs

Cf. A075892 (a subsequence).

Programs

  • Mathematica
    Take[Union[Total[#]/2&/@(Tuples[Prime[Range[2,20]],2]^2)],60] (* Harvey P. Dale, Dec 28 2014 *)
  • PARI
    list(lim)=my(v=List(), p2); lim\=1; if(lim<9, lim=8); forprime(p=3, sqrtint(2*lim-9), p2=p^2; forprime(q=3, min(sqrtint(2*lim-p2), p), listput(v, (p2+q^2)/2))); Set(v) \\ Charles R Greathouse IV, Feb 14 2017

A289398 Least integer m > n such that (n^2 + m^2)/2 is a square.

Original entry on oeis.org

7, 14, 21, 28, 35, 42, 17, 56, 63, 70, 77, 84, 91, 34, 105, 112, 31, 126, 133, 140, 51, 154, 47, 168, 175, 182, 189, 68, 203, 210, 49, 224, 231, 62, 85, 252, 259, 266, 273, 280, 113, 102, 301, 308, 315, 94, 79, 336, 71, 350, 93, 364, 371, 378, 385, 136, 399, 406, 413, 420
Offset: 1

Views

Author

Zak Seidov, Jul 05 2017

Keywords

Comments

From first 100 terms, in 65 cases a(n) = 7*n. In general, a(n) <= 7*n.
From Robert Israel, Jul 07 2017: (Start)
For any p in A042999, a(n) == 0 (mod p) if and only if n == 0 (mod p), with a(p*k) = p*a(k).
Thus if n = m*r where all prime factors of m are in A042999, a(n) = m*a(r).
In particular, if all prime factors of n are in A042999, then a(n) = 7*n.
Conjecture: this is "if and only if".
(End)
Alternatively: A306236(n) is the smallest integer m > n with integer j > m that makes n^2, m^2 and j^2 an arithmetic progression. This is the sequence of j. - Jinyuan Wang, Feb 09 2019.

Examples

			a(1)=7: (1^2 + 7^2)/2 = 5^2;
a(7)=17: (7^2 + 17^2)/2 = 5^2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m; for m from n+2 by 2 do if issqr((n^2+m^2)/2) then return m fi od end proc:
    map(f, [$1..100]); # Robert Israel, Jul 07 2017
  • Mathematica
    n=0;Table[n++;m=n+1;While[!IntegerQ[Sqrt[(n^2+m^2)/2]],m++];m,{100}]
  • PARI
    a(n) = my(m=n+1); while(!issquare((n^2+m^2)/2), m++); m; \\ Michel Marcus, Jul 07 2017
    
  • Python
    from itertools import count
    from sympy.ntheory.primetest import is_square
    def A289398(n): return next(m for m in count(n+2,2) if is_square(n**2+m**2>>1)) # Chai Wah Wu, Mar 02 2025
Showing 1-3 of 3 results.