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.

A371618 Indices where prime(n) first appears in A373902.

This page as a plain text file.
%I A371618 #35 Aug 16 2025 17:38:02
%S A371618 1,10,14,44,108,135,209,252,401,840,890,1197,1446,1678,1810,2408,2796,
%T A371618 3207,3799,4212,4716,5246,5590,6617,8042,8564,9253,9845,10549,12447,
%U A371618 14768,15328,16820,17368,18876,21480,22798,24802,26142,27567,28511,29373,32550,33416,35010,35852,40976,43945
%N A371618 Indices where prime(n) first appears in A373902.
%C A371618 For the terms studied, in the list of primes' first appearance, they appear in their natural order.
%H A371618 Michael S. Branicky, <a href="/A371618/b371618.txt">Table of n, a(n) for n = 1..887</a> (terms 1..178 from Scott R. Shannon)
%t A371618 nn = 45000; c[_] := {}; p[_] := False; a[1] = j = 2; c[2] = {2}; p[2] = 1;
%t A371618 {p[2]}~Join~Monitor[Reap[
%t A371618   Do[If[PrimePowerQ[j],
%t A371618     (k = 1;
%t A371618        While[Or[j == #  k, CoprimeQ[j, #  k], ! FreeQ[c[j], #  k]], k++];
%t A371618        k *= #) &[FactorInteger[j][[1, 1]]],
%t A371618      k = FactorInteger[j][[1, 1]];
%t A371618        While[Or[j == k, CoprimeQ[j, k], ! FreeQ[c[j], k]], k++] ];
%t A371618     If[PrimeQ[k], If[! p[k], Sow[n]; p[k] = True]];
%t A371618     Set[{a[n], c[j], c[k], j},
%t A371618 {k, Union[c[j], {k}], Union[c[k], {j}], k}], {n, 2, nn}] ][[-1, 1]], n] (* _Michael De Vlieger_, Jun 22 2024 *)
%Y A371618 Cf. A373902, A000040.
%K A371618 nonn
%O A371618 1,2
%A A371618 _Scott R. Shannon_, Jun 22 2024