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.

Showing 1-2 of 2 results.

A076423 Number of iterations of the mapping k -> abs(reverse(lpd(k))-reverse(gpf(k))) to reach zero, or -1 if zero is never reached. lpd(k) is the largest proper divisor and gpf(k) is the greatest prime factor of k.

Original entry on oeis.org

1, 2, 3, 1, 2, 1, 2, 3, 1, 1, 2, 4, 3, 1, 1, 2, 3, 2, 3, 2, 1, 1, 6, 3, 1, 1, 2, 2, 2, 2, 5, 3, 1, 1, 1, 3, 5, 1, 1, 4, 4, 3, 2, 3, 2, 1, 5, 2, 1, 6, 1, 6, 2, 2, 1, 7, 1, 1, 2, 3, 2, 1, 3, 2, 1, 2, 7, 3, 1, 2, 3, 4, 4, 1, 6, 4, 1, 2, 4, 2, 2, 1, 6, 4, 1, 1, 1, 2, 4, 2, 1, 4, 1, 1, 1, 3, 3, 2, 2, 1, 2, 8, 3, 2, 2
Offset: 1

Views

Author

Klaus Brockhaus, Oct 11 2002

Keywords

Comments

See A076425 for numbers such that zero is never reached, A076424 for the smallest number that needs n iterations to reach zero, A076426 for fixed points of the mapping.

Examples

			For n = 13: lpd(13) = 1, gpf(13)=13, abs(reverse(1)-reverse(13)) = 30; lpd(30) = 15, gpf(30) = 5, abs(reverse(15)-reverse(5)) = 46; lpd(46) = 23, gpf(46)=23, abs(reverse(23)-reverse(23)) = 0. Three iterations to reach zero, so a(13) = 3.
		

Crossrefs

Programs

  • PARI
    {stop=20; for(n=1,105,c=1; b=1; k=n; while(b&&c<=stop,w=divisors(k); s=matsize(w)[2]-1; z=if(s>0,w[s],1); p=0; while(z>0,d=divrem(z,10); z=d[1]; p=10*p+d[2]); z=if(k==1,1,vecmax(component(factor(k),1))); q=0; while(z>0,d=divrem(z,10); z=d[1]; q=10*q+d[2]); k=abs(p-q); if(k>0,c++,b=0)); print1(if(c>stop,-1,c),","))}

A076426 Fixed points of the mapping k -> abs(reverse(lpd(k))-reverse(Lpf(k))). lpd(k) is the largest proper divisor and Lpf(k) is the largest prime factor of k.

Original entry on oeis.org

5750, 33866, 74841, 517250, 577750, 5538710, 51414250, 51454250, 51687250, 51727250, 51748250, 51858250, 52525250, 57515750, 57535750, 57575750, 57757750, 67597352, 841794296, 5120202250, 5120802250, 5121612250
Offset: 1

Views

Author

Klaus Brockhaus, Oct 11 2002

Keywords

Comments

Besides these fixed points (cycles of length 1) there are five cycles of length 2 ([9378, 9739], [518775, 522075], [5170250, 5197250], [5219475, 5249775], [5255750, 5755250]) and one cycle of length 3 ([7285, 7467, 9711]) below 8000000.

Examples

			lpd(5750) = 2875; Lpf(5750) = 23; 5782 - 32 = 5750.
		

Crossrefs

Programs

  • PARI
    {for(n=1,34000,v=divisors(n); a=matsize(v)[2]; z=if(a>1,v[a-1],1); p=0; while(z>0,d=divrem(z,10); z=d[1]; p=10*p+d[2]); z=if(n==1,1,vecmax(component(factor(n),1))); q=0; while(z>0,d=divrem(z,10); z=d[1]; q=10*q+d[2]); if(abs(p-q)==n,print1(n,",")))}

Formula

abs(reverse(lpd(n))-reverse(Lpf(n))) = n.

Extensions

Offset corrected and a(7)-a(22) from Donovan Johnson, Aug 09 2010
Showing 1-2 of 2 results.