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 A072965 #25 Aug 20 2024 09:08:43 %S A072965 1,2,3,4,5,6,7,8,9,10,11,12,13,14,1,16,17,18,19,20,21,22,23,24,25,26, %T A072965 27,28,29,2,31,32,33,34,1,36,37,38,39,40,41,42,43,44,3,46,47,48,49,50, %U A072965 51,52,53,54,55,56,57,58,59,4,61,62,63,64,65,66,67,68,69,2,71,72,73,74 %N A072965 In prime factorization of n replace all matching twin prime pairs with 1, where (3,5)-matches are replaced before (5,7). %C A072965 a(a(n)) = a(n); a(A037074(n)) = 1. %C A072965 a(n) = 1 iff n = A074480(k) for some k. %C A072965 a(n) mod A037074(k) > 0 for all k. - _Reinhard Zumkeller_, Jan 29 2008 %H A072965 Reinhard Zumkeller, <a href="/A072965/b072965.txt">Table of n, a(n) for n = 1..10000</a> %e A072965 a(30)=a(2*3*5)=2*1=2; a(105)=a(3*5*7)=1*7=7; a(143)=a(11*13)=1; a(225)=a(3*3*5*5)=a((3*5)*(3*5))=1*1=1; a(525)=a(3*5*5*7)=a((3*5)*(5*7))=1*1=1. %t A072965 a[n_] := Times @@ (Flatten[ (Table[#[[1]], {#[[2]]}] & ) /@ FactorInteger[n]] //. {p1___, p2_, p3_, p4___} /; p3 == p2 + 2 -> {p1, p4}); Table[a[n], {n, 1, 74}](* _Jean-François Alcover_, Nov 04 2011 *) %o A072965 (PARI) a(n)=my(f=factor(n),t);for(i=2,#f[,1],if(f[i-1,1]+2==f[i,1],t=min(f[i-1,2],f[i,2]);f[i-1,2]-=t;f[i,2]-=t));factorback(f) \\ _Charles R Greathouse IV_, Nov 04 2011 %o A072965 (Haskell) %o A072965 a072965 n = f 1 (a027746_row n) where %o A072965 f y [] = y %o A072965 f y [p] = p * y %o A072965 f y (2:ps) = f (2 * y) ps %o A072965 f y (3:5:_) = a072965 (n `div` 15) %o A072965 f y (p:qs@(q:ps)) | q == p + 2 = f y ps %o A072965 | otherwise = f (p * y) qs %o A072965 -- _Reinhard Zumkeller_, Oct 31 2012 %Y A072965 Cf. A001359, A006512. %Y A072965 Cf. A027746. %K A072965 nonn,nice,easy %O A072965 1,2 %A A072965 _Reinhard Zumkeller_, Aug 20 2002