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.

A170990 Carryless product n X n in base 9.

Original entry on oeis.org

0, 1, 4, 0, 7, 7, 0, 4, 1, 81, 100, 121, 135, 160, 97, 108, 130, 145, 324, 361, 400, 351, 394, 349, 378, 337, 370, 0, 55, 31, 0, 61, 34, 0, 58, 28, 567, 640, 634, 621, 619, 610, 594, 589, 577, 567, 577, 589, 594, 610, 619, 621, 634, 640, 0, 28, 58, 0, 34, 61, 0, 31, 55, 324, 370
Offset: 0

Views

Author

N. J. A. Sloane, Aug 29 2010

Keywords

Crossrefs

For bases 2 through 10 see A000695, A169999, A170985-A170990 and A059729. A169821 is a less satisfactory variant.

Programs

  • PARI
    a(n) = fromdigits(Vec(Pol(digits(n, 9))^2)%9, 9); \\ Seiichi Manyama, Mar 09 2023

A169908 a(n) = n*n in carryless digital root arithmetic in base 10.

Original entry on oeis.org

0, 1, 4, 9, 7, 7, 9, 4, 1, 9, 100, 121, 144, 169, 187, 117, 139, 154, 171, 199, 400, 441, 484, 439, 477, 427, 469, 414, 451, 499, 900, 961, 934, 999, 967, 937, 999, 964, 931, 999, 700, 781, 774, 769, 757, 747, 739, 724, 711, 799, 700, 711, 724, 739, 747, 757
Offset: 0

Views

Author

Keywords

Comments

Addition and multiplication are the same as in school, that is, done in base 10, except that there are no carries and when individual digits are added or multiplied the result is replaced by its digital root (A010888).

Examples

			14*14 = 187:
..14
..14
----
..47
.14.
----
.187
----
		

Crossrefs

Programs

  • Maple
    A010888 := proc(n)
        if n = 0 then
            0;
        else
            1+modp(n-1,9) ;
        end if;
    end proc:
    carryLmult1dig := proc(a,b)
        local adigs,cdigs,d,len ;
        if b <= 9 then
            adigs := convert(a,base,10) ;
            len := nops(adigs) ;
            cdigs := [seq( A010888(b*op(d,adigs)) ,d=1..len)] ;
            add(op(d,cdigs)*10^(d-1),d=1..len) ;
        else
            error b,"not smaller than 10" ;
        end if;
    end proc:
    carryLmult := proc(a,b)
        local adigs,bdigs,c,len ;
        adigs := convert(a,base,10) ;
        bdigs := convert(b,base,10) ;
        len := max(nops(adigs),nops(bdigs)) ;
        c := 0 ;
        for i from 1 to nops(bdigs) do
            carryLmult1dig(a,op(i,bdigs)) ;
            c := carryLadd(c,%*10^(i-1)) ;
        end do:
        c ;
    end proc:
    A169908 := proc(n)
        carryLmult(n,n) ;
    end proc: # R. J. Mathar, Jul 12 2013
Showing 1-2 of 2 results.