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.

A342491 a(n) = f(x)+f(y)+f(z), where (x,y,h) is the n-th Pythagorean triple listed in (A046083, A046084, A009000), and f(m)=A176774(m) is the smallest polygonality of m.

Original entry on oeis.org

12, 14, 23, 12, 28, 29, 27, 20, 38, 52, 27, 22, 11, 47, 20, 49, 53, 16, 69, 81, 17, 47, 59, 59, 34, 41, 93, 32, 76, 33, 34, 121, 76, 93, 88, 33, 37, 39, 101, 102, 83, 27, 90, 52, 73, 183, 75, 37, 45, 130, 105, 15, 155, 83, 120, 54, 106, 133, 129, 15, 123, 42, 225
Offset: 1

Views

Author

Michel Marcus, Mar 14 2021

Keywords

Comments

Inspired by (A245646, A245647, A245648), for which a(n) = 12.
Examples of lower terms: 11 for (21, 28, 35), 10 for (64, 120, 136) and 9 for (8778, 10296, 13530).

Examples

			a(1) = 12 because (3, 4, 5) are (3-, 4-, 5-) gonal numbers, and 3+4+5=12.
		

Crossrefs

Cf. A213188 (see 2nd comment).

Programs

  • PARI
    tp(n) = my(k=3); while( !ispolygonal(n,k), k++); k; \\ A176774
    f(v) = vecsum(apply(tp, v));
    list(lim) = {my(v=List(), m2, s2, h2, h); for(middle=4, lim-1, m2=middle^2; for(small=1, middle, s2=small^2; if(issquare(h2=m2+s2, &h), if(h>lim, break); listput(v, [h, middle, small]);););); v = vecsort(Vec(v)); apply(f, v);} \\ adapted from A009000

Formula

a(n) = f(A046083(n)) + f(A046084(n)) + f(A009000(n)) where f is A176774.