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.

A077662 a(n) = n-th positive integer not relatively prime to n, with a(1)=1.

This page as a plain text file.
%I A077662 #10 May 26 2023 17:03:56
%S A077662 1,4,9,8,25,9,49,16,27,16,121,18,169,24,33,32,289,27,361,34,49,40,529,
%T A077662 36,125,48,81,49,841,40,961,64,84,64,112,54,1369,72,102,66,1681,58,
%U A077662 1849,80,96,88,2209,72,343,84,136,96,2809,81,200,98,153,112,3481,82
%N A077662 a(n) = n-th positive integer not relatively prime to n, with a(1)=1.
%C A077662 Final term of n-th row of A077661.
%H A077662 Franklin T. Adams-Watters, <a href="/A077662/b077662.txt">Table of n, a(n) for n = 1..1000</a>
%t A077662 Join[{1},Table[Select[Range[5000],!CoprimeQ[#,n]&][[n]],{n,2,60}]] (* _Harvey P. Dale_, May 26 2023 *)
%o A077662 (PARI) a(n) = local(i, k); if(n<=1,n,k=n-eulerphi(n);i=n\k;k*=i;i*=n; while(k<n,k+=(gcd(i++,n)!=1));i)
%Y A077662 Cf. A077661, A077663, A069213.
%Y A077662 A077149(n) - n - 1.
%K A077662 nonn
%O A077662 1,2
%A A077662 _Amarnath Murthy_, Nov 14 2002
%E A077662 More terms from _Sascha Kurz_, Jan 27 2003