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.

A072330 Common difference n such that primitive triangles exist which are n-arithmetic (i.e., primitive Heronian triangles whose sides in arithmetic progression have common difference n).

Original entry on oeis.org

1, 11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 121, 131, 143, 157, 167, 169, 179, 181, 191, 193, 227, 229, 239, 241, 251, 253, 263, 277, 299, 311, 313, 337, 347, 349, 359, 373, 383, 397, 407, 409, 419, 421, 431, 433, 443, 457, 467, 479, 481, 491, 503
Offset: 1

Views

Author

Lekraj Beedassy, Jul 15 2002

Keywords

Comments

The first entry in particular is associated with sequences A003500 and A007655.
Such a triangle has a middle side 2*x partitioned into x +- 2*n by the corresponding altitude (i.e., median and altitude points are always a distance 2*n apart).

Crossrefs

Programs

  • Maple
    isA072330 := proc(n)
        if n = 1 then
            true;
        else
            for p in ifactors(n)[2] do
                if not modp(op(1,p),12) in {1,11} then
                    return false ;
                end if;
            end do:
            true;
        end if;
    end proc:
    for n from 1 to 1000 do
        if isA072330(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 26 2017
  • Mathematica
    fac12Q[n_] := And @@ (MemberQ[{1, 11}, #] & /@ Mod[First /@ FactorInteger@ n, 12]); Select[Range[600], fac12Q] (* Frank M Jackson, Apr 09 2016 with simplification by Giovanni Resta *)
    okQ[n_] := AllTrue[FactorInteger[n][[All, 1]], MatchQ[Mod[#, 12], 1|11]&];
    Select[Range[1000], okQ] (* Jean-François Alcover, Mar 06 2020 *)

Formula

n = 1 or a product of primes p congruent to +- 1 (mod 12).

Extensions

Corrected and extended by Ray Chandler, Jul 02 2004
Incorrect b-file by Carmine Suriano replaced by Frank M Jackson, May 09 2016