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.

A260702 Numbers n such that 3*n and n^2 have the same digit sum.

Original entry on oeis.org

0, 3, 6, 9, 12, 15, 18, 21, 30, 33, 39, 45, 48, 51, 60, 66, 90, 96, 99, 102, 105, 111, 120, 123, 129, 132, 150, 153, 156, 159, 162, 165, 180, 189, 195, 198, 201, 210, 225, 231, 246, 252, 255, 261, 285, 300, 330, 333, 348, 351, 390, 399, 429, 450, 453, 459, 462
Offset: 1

Views

Author

Vincenzo Librandi, Nov 17 2015

Keywords

Comments

All terms are multiple of 3.
If n is in the sequence, then so is 10*n. - Robert Israel, Apr 05 2020

Examples

			159 is in the sequence because 159^2 = 25281 and 3*159 = 477 have the same digit sum: 18.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500] | &+Intseq(3*n) eq &+Intseq(n^2)];
    
  • Maple
    select(n -> convert(convert(3*n,base,10),`+`)=convert(convert(n^2,base,10),`+`), [seq(i,i=0..1000,3)]); # Robert Israel, Apr 05 2020
  • Mathematica
    Select[Range[0, 500], Total[IntegerDigits[3 #]] == Total[IntegerDigits[#^2]] &]
  • PARI
    isok(n) = sumdigits(3*n) == sumdigits(n^2); \\ Michel Marcus, Nov 17 2015
    
  • Sage
    [n for n in (0..500) if sum((3*n).digits())==sum((n^2).digits())] # Bruno Berselli, Nov 17 2015

Formula

A007953(A008585(a(n))) = A007953(A000290(a(n))).

A260906 Numbers n such that 3*n and n^3 have the same digit sum.

Original entry on oeis.org

0, 3, 6, 30, 60, 63, 126, 171, 252, 300, 324, 543, 585, 600, 630, 1260, 1281, 1710, 2520, 2925, 3000, 3240, 5430, 5850, 5946, 6000, 6300, 12600, 12606, 12633, 12810, 14631, 16263, 17100, 21618, 22308, 22971, 24663, 25200, 27633, 28845, 28887, 28965, 29241
Offset: 1

Views

Author

Vincenzo Librandi, Nov 18 2015

Keywords

Comments

All terms are multiples of 3.
n is in the sequence iff 10*n is. Are there infinitely many terms not divisible by 10? - Robert Israel, Nov 20 2015

Examples

			126 is in the sequence because 126^3 = 2000376 and 3*126 = 378 have the same digit sum: 18.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..50000] | &+Intseq(3*n) eq &+Intseq(n^3)];
    
  • Maple
    select(n -> convert(convert(n^3,base,10),`+`)=convert(convert(3*n,base,10),`+`), 3*[$0..10^5]); # Robert Israel, Nov 20 2015
  • Mathematica
    Select[Range[0, 50000], Total[IntegerDigits[3 #]] == Total[IntegerDigits[#^3]] &]
  • PARI
    for(n=0, 1e5, if(sumdigits(n^3)==sumdigits(3*n), print1(n, ", "))) \\ Altug Alkan, Nov 20 2015

Formula

A007953(A008585(a(n))) = A007953(A000578(a(n))).
Showing 1-2 of 2 results.