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.

A132629 Sigma(n)/Sum_digits(n) for n such that sigma(n) is divisible by Sum_digits(n).

Original entry on oeis.org

1, 2, 18, 6, 4, 2, 21, 9, 10, 24, 8, 8, 6, 16, 12, 14, 28, 12, 12, 9, 9, 5, 8, 26, 217, 51, 72, 26, 42, 32, 11, 108, 62, 40, 18, 120, 28, 32, 63, 56, 27, 24, 32, 21, 18, 19, 62, 26, 54, 24, 24, 12, 32, 30, 16, 36, 21, 26
Offset: 0

Views

Author

Keywords

Examples

			n=147 -> sigma(n)=1+3+7+21+49+147=228 Sum_digits(n)=1+4+7=12 -> 228/12 = 19
n=177 -> sigma(n)=1+3+59+177=240 Sum_digits(n)=1+7+7=15 -> 240/15 = 16
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(n) local a,i,j,k,w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; j:=sigma(i)/w; if trunc(j)=j then print(j); fi; od; end: P(200);
  • Mathematica
    Select[Table[DivisorSigma[1,n]/Total[IntegerDigits[n]],{n,300}], IntegerQ] (* Harvey P. Dale, Oct 01 2015 *)

A341693 Numbers k whose sum of digits divides sigma(k)-k.

Original entry on oeis.org

1, 6, 10, 14, 20, 24, 26, 30, 38, 42, 44, 60, 78, 90, 100, 102, 106, 110, 112, 114, 120, 121, 132, 150, 153, 176, 182, 190, 198, 202, 204, 210, 220, 222, 224, 240, 244, 258, 260, 264, 268, 270, 272, 280, 285, 294, 298, 306, 312, 314, 330, 332, 334, 360, 361, 393, 395
Offset: 1

Views

Author

Zdenek Cervenka, May 24 2021

Keywords

Examples

			k=10 -> sigma(k)=1+2+5+10=18 sum_digits(k)=1+0=1 -> 18/1 = 18.
k=42 -> sigma(k)=1+2+3+6+7+14+21+42=96 sum_digits(k)=4+2=6 -> 96/6 = 16.
		

Crossrefs

Programs

  • Maple
    isA341693 := proc(n)
        if modp(numtheory[sigma](n)-n,digsum(n)) =0 then
            true;
        else
            false;
        end if
    end proc:
    for n from 1 to 395 do
        if isA341693(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jun 04 2021
  • Mathematica
    Select[Range[400], Divisible[DivisorSigma[1, #] - #, Plus @@ IntegerDigits[#]] &] (* Amiram Eldar, May 24 2021 *)
  • PARI
    list(nn) = for(n=1, nn, if ((sigma(n)-n) % sumdigits(n) == 0, print1(n, ", ")))
    list(1000)
Showing 1-2 of 2 results.