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

A354381 Primitive elements in A354379, being those not divisible by any previous term.

Original entry on oeis.org

25, 65, 85, 89, 109, 145, 149, 169, 173, 185, 205, 221, 229, 233, 265, 289, 293, 305, 313, 349, 353, 365, 377, 409, 421, 433, 449, 461, 481, 485, 493, 505, 509, 533, 565, 601, 613, 629, 641, 653, 677, 685, 689, 697, 709, 757, 761, 769, 773, 785, 793, 797, 821, 829, 841, 857, 877, 881, 901, 905
Offset: 1

Views

Author

Lamine Ngom, May 24 2022

Keywords

Examples

			The primitive Pythagorean triple (39, 80, 89) has all its terms in A009003, and 89 is not divisible by any previous term. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    R:= []: count:= 0:
    for n from 1 while count < 100 do
      if ormap(t -> n mod t = 0, R) then next fi;
      if filter(n) then R:= [op(R),n]; count:= count+1; fi
    od:
    R; # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[ FactorInteger[n][[All, 1]], Mod[#, 4] == 1 &] ;
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #] &];
    R = {}; count = 0;
    For[n = 1, count < 100, n++, If[AllTrue[R, Mod[n, #] != 0&], If[filter[n], AppendTo[R, n]; count++]]];
    R (* Jean-François Alcover, May 11 2023, after Robert Israel *)

Extensions

Corrected by Robert Israel, Jan 10 2023
Showing 1-1 of 1 results.