login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007961 n written in base where place values are positive squares. 8
1, 2, 3, 10, 11, 12, 13, 20, 100, 101, 102, 103, 110, 111, 112, 1000, 1001, 1002, 1003, 1010, 1011, 1012, 1013, 1020, 10000, 10001, 10002, 10003, 10010, 10011, 10012, 10013, 10020, 10100, 10101, 100000, 100001, 100002, 100003, 100010, 100011 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

For n>1: A000196(n) = number of digits of a(n); A190321(n) = number of nonzero digits of a(n); A053610(n) = sum of digits of a(n). [Reinhard Zumkeller, May 08 2011]

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

F. Smarandache, Only Problems, Not Solutions!.

MAPLE

A007961 := proc(n)

    local k, nrem, L, b, d;

    k := floor(sqrt(n)) ;

    nrem := n ;

    L := [] ;

    for b from k to 1 by -1 do

        d := floor(nrem/b^2) ;

        L := [d, op(L)] ;

        nrem := nrem -d*b^2 ;

    end do:

    add( op(i, L)*10^(i-1), i=1..nops(L)) ;

end proc: # R. J. Mathar, Jul 25 2015

PROG

(Haskell)

import Data.Char (intToDigit)

a007961 :: Integer -> Integer

a007961 n = read $ map intToDigit $

  t n $ reverse $ takeWhile (<= n) $ tail a000290_list where

    t _ []          = []

    t m (x:xs)

        | x > m     = 0 : t m xs

        | otherwise = (fromInteger m') : t r xs

        where (m', r) = divMod m x

-- Reinhard Zumkeller, May 08 2011

CROSSREFS

Cf. A000290, A000433.

Sequence in context: A102859 A069967 A061909 * A212067 A060811 A146327

Adjacent sequences:  A007958 A007959 A007960 * A007962 A007963 A007964

KEYWORD

nonn,base

AUTHOR

R. Muller

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 12:58 EDT 2018. Contains 313917 sequences. (Running on oeis4.)