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.

A345038 Triangle T(n,k) read by rows of the smallest centered n-gonal number greater than 1 that is also centered k-gonal, or 0 if none exists, for 1 <= k <= n.

This page as a plain text file.
%I A345038 #31 Jul 06 2021 02:38:02
%S A345038 2,7,3,4,31,4,0,13,85,5,16,31,31,181,6,7,7,19,61,331,7,22,43,316,841,
%T A345038 106,547,8,121,0,361,25,22801,169,841,9,0,91,10,0,1891,91,253,1225,10,
%U A345038 11,31,31,61,31,61,2101,361,1711,11,67,111,166,8581,1156,397,6931,179479609,496,2311,12
%N A345038 Triangle T(n,k) read by rows of the smallest centered n-gonal number greater than 1 that is also centered k-gonal, or 0 if none exists, for 1 <= k <= n.
%C A345038 The i-th centered j-gonal number is j*i*(i-1)/2 + 1. Thus if the p-th centered n-gonal number is also the q-th centered k-gonal number, then n*p*(p-1) = k*q*(q-1). Therefore T(n,k) = n*p*(p-1)/2 + 1 = k*q*(q-1)/2 + 1 iff n*p*(p-1) = k*q*(q-1) has a nontrivial positive integer solution. Otherwise T(n,k) = 0. It also implies that when T(n,k) = 0, T(r*n,r*k) = 0 for any positive integer r.
%H A345038 <a href="/index/Ce#CENTRALCUBE">Index entries for sequences related to centered polygonal numbers</a>
%F A345038 T(n,n) = n+1.
%e A345038 The triangle begins:
%e A345038    2;
%e A345038    7,   3;
%e A345038    4,  31,   4;
%e A345038    0,  13,  85,   5;
%e A345038   16,  31,  31, 181,   6;
%e A345038    7,   7,  19,  61, 331,   7;
%e A345038   22,  43, 316, 841, 106, 547,   8;
%e A345038   ...
%o A345038 (PARI)
%o A345038 iszero(n,k)={if(issquare(n) && issquare(k) && n<>k, my(t=n-k); fordiv(t, d, my(p=(d+t/d)/2/sqrtint(n), q=(d-t/d)/2/sqrtint(k)); if(abs(p)!=1 && !frac(p) && !frac(q) && p%2==1 && q%2==1, return(0))); 1, 0)}
%o A345038 T(n, k)={my(g=gcd(n,k)); n/=g; k/=g; if(iszero(n, k), 0, for(p=2, oo, my(t=n*p*(p-1)/2); if(t%k==0 && ispolygonal(t/k, 3), return(t*g+1))))} \\ _Andrew Howroyd_, Jun 08 2021
%Y A345038 Cf. A101321, A189216.
%K A345038 nonn,tabl
%O A345038 1,1
%A A345038 _Mohammed Yaseen_, Jun 06 2021