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.
%I A346494 #39 Sep 16 2021 12:25:00 %S A346494 7,18,55,112,286,403,697,874,1288,2059,2356,3367,4141,4558,5452,6943, %T A346494 8614,9211,11122,12496,13213,15484,17098,19669,23377,25351,26368, %U A346494 28462,29539,31753,40132,42706,46717,48094,55279,56776,61387,66178,69472,74563,79834 %N A346494 Heptagonal numbers (A000566) with prime indices (A000040). %F A346494 a(n) = A000566(A000040(n)) = prime(n)*(5*prime(n)-3)/2. %e A346494 a(1) = Heptagonal(prime(1)) = A000566(2) = 2*(5*2-3)/2 = 7; %e A346494 a(2) = Heptagonal(prime(2)) = A000566(3) = 3*(5*3-3)/2 = 18; %e A346494 a(3) = Heptagonal(prime(3)) = A000566(5) = 5*(5*5-3)/2 = 55. %t A346494 A346494[n_] := PolygonalNumber[7, Prime[n]]; Table[A346494[n], {n, 1, 41}] (* _Robert P. P. McKone_, Aug 22 2021 *) %o A346494 (Sage) %o A346494 A = [int(p*(5*p-3)/2) for p in range(0,10^3) if p in Primes()] %o A346494 (Python) %o A346494 from sympy import primerange %o A346494 print([p*(5*p-3)//2 for p in primerange(1, 180)]) # _Michael S. Branicky_, Aug 22 2021 %o A346494 (PARI) a(n) = my(p=prime(n)); p*(5*p-3)/2; \\ _Michel Marcus_, Sep 16 2021 %Y A346494 Cf. A000566, A034953, A001248, A116995, A117961, A267144. %K A346494 nonn,easy %O A346494 1,1 %A A346494 _Dumitru Damian_, Aug 22 2021