login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239935 Numbers k such that DigitSum(3^k) > DigitSum(3^(k+1)). 2
11, 14, 15, 18, 20, 27, 29, 31, 34, 38, 41, 43, 47, 48, 50, 53, 54, 58, 59, 63, 64, 65, 67, 69, 71, 72, 75, 77, 79, 83, 88, 90, 94, 98, 99, 102, 103, 107, 109, 112, 114, 118, 119, 123, 125, 131, 132, 134, 136, 139, 141, 142, 146, 150, 154, 159, 161, 164, 167 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For k=11, we have DigitSum(3^11) = 27 > 18 = DigitSum(3^12).
MAPLE
N:= 1000: # to get the first N terms
threen:= 3:
digsum:= 3:
count:= 0:
for n from 1 while count < N do
threen:= 3*threen;
oldsum:= digsum;
digsum:= convert(convert(threen, base, 10), `+`);
if oldsum > digsum then
count:= count+1;
A239935[count]:= n;
fi
od: # Robert Israel, Apr 18 2014
MATHEMATICA
lis = Table[Total[IntegerDigits[3^n, 10]], {n, 1, 100}];
Flatten[Position[Greater @@@ Partition[lis, 2, 1], True]]
PROG
(PARI) isok(k) = sumdigits(3^k) > sumdigits(3^(k+1)); \\ Michel Marcus, Jul 03 2021
CROSSREFS
Sequence in context: A091403 A061743 A038630 * A219179 A221281 A025058
KEYWORD
nonn,base
AUTHOR
Oliver Bel, Mar 29 2014
EXTENSIONS
More terms from Jon E. Schoenfield, Mar 29 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)