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.

A121082 Number of primitive Pythagorean-like triples a^2+b^2=c^2+k for k=-1 with c<=10^n.

This page as a plain text file.
%I A121082 #9 Oct 17 2015 09:18:03
%S A121082 2,14,126,1238,12517,124973,1249931,12500186,125000681,1250005179
%N A121082 Number of primitive Pythagorean-like triples a^2+b^2=c^2+k for k=-1 with c<=10^n.
%C A121082 It is conjectured by the first author that a(n)/10^n as n->inf is 1/8 = 0.125.
%e A121082 a(1)=2 because there are 2 solutions (a,b,c) as (2,2,3),(4,8,9) with c<=10^1.
%t A121082 Courtesy of Daniel Lichtblau of Wolfram Research: countTriples[m_, k_] := Module[ {c2, c2odd, total = 0, fax, g}, Do[ c2 = c^2 + k; If[c2 < 2, Continue[]]; c2odd = c2; While[EvenQ[c2odd], c2odd /= 2]; If [c2odd==1, If [OddQ[Log[2,c2]], total++ ]; Continue[]]; If[Mod[c2odd, 4] == 3, Continue[]]; g = GCD[c2odd, 100947]; If[g != 1 && g^2 != GCD[c2odd, 10190296809], Continue[]]; fax = Map[{Mod[ #[[1]],4],#[[2]]}&, FactorInteger[c2odd]]; If[Apply[Or, Map[ #[[1]] == 3 && OddQ[ #[[2]]] &, fax]], Continue []]; fax = Cases[fax, {1,aa_}:>aa+1]; fax = Ceiling[Apply[Times,fax]/2]; total += fax;, {c,m}]; total]
%Y A121082 Cf. A101931.
%K A121082 more,nonn
%O A121082 1,1
%A A121082 _Tito Piezas III_, Aug 11 2006
%E A121082 First few terms found by _Tito Piezas III_, James Waldby (j-waldby(AT)pat7.com). Subsequent terms found by Andrzej Kozlowski (akoz(AT)mimuw.edu.pl), Daniel Lichtblau (danl(AT)wolfram.com).
%E A121082 a(8)-a(10) from _Hiroaki Yamanouchi_, Oct 17 2015