Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Sep 08 2022 08:45:07
%S 1,2,5,4,5,12,17,10,15,16,31,36,9,28,41,48,57,24,31,50,9,16,37,48,49,
%T 76,15,42,85,116,79,114,137,52,41,96,121,148,27,52,79,144,139,16,65,
%U 136,109,84,141,220,49,86,169,166,209,254,33,124,169,240,55,48,297,66
%N Let n^2 = q*prime(n) + r with 0 <= r < prime(n); then a(n) = q + r.
%C The digital sum (base the n-th prime) of n^2.
%C A lower bound is a(n) >= n^2/prime(n) ~ n/log(n log n). No term less than this can occur after index n, e.g., a(n) > 126 for n > 10^3 and a(n) > 954 for n > 10^4. "Late birds" (such that a(k) > a(n) for all k > n) are a(1) = 1, a(2) = 2, a(4) = 4, a(5) = 5, a(21) = 9, a(27) = 15, a(44) = 16, a(104) = 24, a(173) = 59, a(365) = 61, a(369) = 81, a(500) = 100, a(590) = 124, a(735) = 129, a(840) = 152, a(987) = 169, a(1564) = 196, a(1797) = 249, a(2415) = 305, a(3368) = 400, a(3545) = 425, a(4025) = 475, a(4466) = 520, a(5018) = 556, a(5477) = 565, a(6686) = 676, a(7239) = 771, a(8025) = 795, a(8182) = 904, a(9369) = 939, ... Values that occur not less often than any smaller one are: 1, 2, 4 (once), 5, 9, 15 (twice), 16, 48, 64, 86, 100 (three times), 144 (five times), 169 (seven times), ... Values that never occur are: 3, 6, 7, 8, 11, 13, 14, 18, 19, 20, 21, 22, 23, 25, 26, 29, 30, 32, 34, 35, 38, 39, 40, 43, 44, 45, 47, 51, 53, 54, 56, 58, 62, 67, 68, 69, 70, 71, 72, 74, 75, 77, 78, 80, 82, 83, 87, 89, 90, 91, 92, 94, 97, 98, 99, ... - _M. F. Hasler_, Nov 25 2016
%H M. F. Hasler, <a href="/A075771/b075771.txt">Table of n, a(n) for n = 1..10000</a>
%H C. Lawson-Perfect and D. Cushing, <a href="http://aperiodical.com/2016/08/integer-sequence-reviews-a075771-a032799-a002717/">Integer Sequence Reviews: A075771, A032799, A002717</a>, The Aperiodical, Aug. 6, 2016
%F a(n) = ds_prime(n)(n^2), where ds_prime(n) = digital sum base the n-th prime.
%F a(n) = n^2 - (prime(n)-1)*floor(n^2/prime(n)). For example, a(2) = ds_prime(2)(2^2) = ds_3(4) = 1 + 1 = 2; a(6) = ds_prime(6)(6^2) = ds_13(36) = 2 + 10 = 12.
%e 6^2/p(6) = 36/13 = 2+10/13; a(6) = 2+10 = 12.
%t Table[n^2 - (Prime[n] - 1) Floor[n^2 / Prime[n]], {n, 80}] (* _Vincenzo Librandi_, Feb 18 2015 *)
%o (PARI) a(n) = {my(sq = n^2); my(p = prime(n)); (sq % p) + sq\p;} \\ _Michel Marcus_, Feb 18 2015
%o (Magma) [n^2-(NthPrime(n)-1)*Floor(n^2/NthPrime(n)): n in [1..70]]; // _Vincenzo Librandi_, Feb 18 2015
%o (PARI) A075771(n)=[1,1]*divrem(n^2,prime(n)) \\ _M. F. Hasler_, Nov 25 2016
%Y Cf. A135101, A135102, A135103.
%K nonn
%O 1,2
%A _Werner D. Sand_, Oct 09 2002