login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A052021 Sum of digits of n is the largest prime factor of n. 7

%I #20 Nov 30 2015 09:39:10

%S 2,3,5,7,12,50,70,308,320,364,476,500,605,700,704,715,832,935,1088,

%T 1183,1547,1729,2401,2584,2618,2704,2926,3080,3200,3536,3640,3952,

%U 4225,4760,4784,4913,5000,5491,5525,5819,5831,6050,6175,6517,6647,7000,7040,7150

%N Sum of digits of n is the largest prime factor of n.

%H Reinhard Zumkeller, <a href="/A052021/b052021.txt">Table of n, a(n) for n = 1..1000</a>

%F {n: A007953(n) = A006530(n)}. - _R. J. Mathar_, May 30 2010

%e 13685 has sum of digits '23' and 13685 = 5*7*17*'23'.

%p A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc:

%p A006530 := proc(n) numtheory[factorset](n) ; max(op(%)) ; end proc:

%p for n from 1 to 8000 do if A007953(n) = A006530(n) then printf("%d,",n) ; end if; end do: # _R. J. Mathar_, May 30 2010

%t Select[Range[2,8000],FactorInteger[#][[-1,1]]==Total[IntegerDigits[#]]&] (* _Harvey P. Dale_, Oct 17 2012 *)

%o (Haskell)

%o a052021 n = a052021_list !! (n-1)

%o a052021_list = tail $ filter (\x -> a007953 x == a006530 x) [1..]

%o -- _Reinhard Zumkeller_, Nov 06 2011

%Y Cf. A052018, A052019, A052020, A052022, A007953, A005349, A028834.

%K nonn,base,nice

%O 1,1

%A _Patrick De Geest_, Nov 15 1999

%E Single-digit primes added by _R. J. Mathar_, May 30 2010

%E Offset corrected by _Reinhard Zumkeller_, Nov 05 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:08 EDT 2024. Contains 371794 sequences. (Running on oeis4.)