(Translated by https://www.hiragana.jp/)
The On-Line Encyclopedia of Integer Sequences (OEIS)
login

Revision History for A308003

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
A modified Sisyphus function: a(n) = concatenation of (number of even digits in n) (number of digits in n) (number of odd digits in n).
(history; published version)
#30 by Michael De Vlieger at Tue Mar 29 08:37:58 EDT 2022
STATUS

proposed

approved

#29 by Michel Marcus at Tue Mar 29 05:02:27 EDT 2022
STATUS

editing

proposed

#28 by Michel Marcus at Tue Mar 29 05:01:30 EDT 2022
MAPLE

# Maple code based on R. J. Mathar's code for A171797:

STATUS

proposed

editing

#27 by Michael S. Branicky at Tue Mar 29 04:57:23 EDT 2022
STATUS

editing

proposed

#26 by Michael S. Branicky at Tue Mar 29 04:57:21 EDT 2022
PROG

(Python)

def a(n):

s = str(n)

e = sum(1 for c in s if c in "02468")

return int(str(e) + str(len(s)) + str(len(s)-e))

print([a(n) for n in range(55)]) # Michael S. Branicky, Mar 29 2022

STATUS

approved

editing

#25 by Alois P. Heinz at Mon Mar 28 19:26:09 EDT 2022
NAME

A modified Sisyphus function: a(n) = concatenation of (number of even digits in n) (number of even digits in n) (number of odd digits in n).

DATA

110, 101, 11, 110, 101, 11, 110, 101, 11, 110, 101, 11, 110, 101, 211, 202, 211, 202, 211, 202, 211, 202, 211, 202, 11, 121, 22, 121, 22, 121, 22, 121, 22, 121, 22, 220, 211, 121, 220, 211, 121, 220, 211, 121, 220, 211, 121, 220, 211, 211, 202, 211, 202, 211, 202, 211, 202, 211, 202, 121, 121, 22, 121, 22, 121, 22, 121, 22, 121, 22, 220, 211, 121, 220, 211, 121, 220, 211, 121, 220, 211, 121, 220, 211, 211, 202, 211121, 121, 22, 121, 22, 121

COMMENTS

If we start with n and repeatedly apply the map i -> a(i), we eventually reach 312 132 (see A073054).

EXAMPLE

11 has 2 digits, both odd, so a(11)=20222 (leading zeros are omitted).

12 has 2 digits, one even and one odd, so a(12)=211121. Then a(211121) = 312132.

MAPLE

Maple code based on R. J. Mathar's code for A171797:

nevenDgs := proc(n) local a, d; a := 0 ; for d in convert(n, base, 10) do if type(d, 'even') then a :=a +1 ; end if; end do; a ; end proc:

cat2 := proc(a, b) local ndigsb; ndigsb := max(ilog10(b)+1, 1) ; a*10^ndigsb+b ; end:

catL := proc(L) local a, i; a := op(1, L) ; for i from 2 to nops(L) do a := cat2(a, op(i, L)) ; end do; a; end proc:

A055642 := proc(n) max(1, ilog10(n)+1) ; end proc:

A308003 := proc(n) local n1, n2 ; n1 := A055642(n) ; n2 := nevenDgs(n) ; catL([n2, n1, n1-n2]) ; end proc:

seq(A308003(n), n=0..80) ;

KEYWORD

nonn,base,easy,changed

EXTENSIONS

Corrected the definition of the sequence.

Modified the terms in the sequence with the corrected definition.

Corrected by Matthew E. Coppenbarger.

Reason: The original Sisyphus function allowed leading digits to be 0. The cited reference defined the modified Sisyphus function to avoid that. The first component should be (the number of digits of n) - this term is never zero.

Removed program: I'm not confident with changing the code, so I deleted it until someone else can provide the correction.

STATUS

editing

approved

#24 by Matthew E. Coppenbarger at Mon Mar 28 11:23:40 EDT 2022
NAME

A modified Sisyphus function: a(n) = concatenation of (number of even digits in n) (number of even digits in n) (number of odd digits in n).

DATA

110, 11, 101, 110, 11, 101, 110, 11, 101, 110, 11, 101, 110, 11, 121, 22, 121, 22, 121, 22, 121, 22, 121, 22, 101, 211, 202, 211, 202, 211, 202, 211, 202, 211, 202, 220, 121, 211, 220, 121, 211, 220, 121, 211, 220, 121, 211, 220, 121, 121, 22, 121, 22, 121, 22, 121, 22, 121, 22, 211, 211, 202, 211, 202, 211, 202, 211, 202, 211, 202, 220, 121, 211, 220, 121, 211, 220, 121, 211, 220, 121, 211, 220, 121, 121, 22, 121, 22, 121211, 211, 202, 211

COMMENTS

If we start with n and repeatedly apply the map i -> a(i), we eventually reach 132 312 (see A073054).

EXAMPLE

11 has 2 digits, both odd, so a(11)=22 (leading zeros are omitted)202.

12 has 2 digits, one even and one odd, so a(12)=121211. Then a(121211) = 132312.

MAPLE

Maple code based on R. J. Mathar's code for A171797:

nevenDgs := proc(n) local a, d; a := 0 ; for d in convert(n, base, 10) do if type(d, 'even') then a :=a +1 ; end if; end do; a ; end proc:

cat2 := proc(a, b) local ndigsb; ndigsb := max(ilog10(b)+1, 1) ; a*10^ndigsb+b ; end:

catL := proc(L) local a, i; a := op(1, L) ; for i from 2 to nops(L) do a := cat2(a, op(i, L)) ; end do; a; end proc:

A055642 := proc(n) max(1, ilog10(n)+1) ; end proc:

A308003 := proc(n) local n1, n2 ; n1 := A055642(n) ; n2 := nevenDgs(n) ; catL([n2, n1, n1-n2]) ; end proc:

seq(A308003(n), n=0..80) ;

EXTENSIONS

Corrected the definition of the sequence.

Modified the terms in the sequence with the corrected definition.

Corrected by Matthew E. Coppenbarger.

Reason: The original Sisyphus function allowed leading digits to be 0. The cited reference defined the modified Sisyphus function to avoid that. The first component should be (the number of digits of n) - this term is never zero.

Removed program: I'm not confident with changing the code, so I deleted it until someone else can provide the correction.

STATUS

approved

editing

Discussion
Mon Mar 28
15:34
Michael S. Branicky: Please revert as the sequence was correct for its title.  Plus, you are re-creating A171797.
16:04
Omar E. Pol: Please, do not change the definition and the terms of sequences from other authors.
19:19
Alois P. Heinz: STOP this destructive behavior ...
19:24
Alois P. Heinz: you changed this into a duplicate of A171797 A modified Sisyphus function: a(n) = concatenation of (number of digits in n) (number of even digits) (number of odd digits).  ...
19:25
Alois P. Heinz: will revert ...
#23 by N. J. A. Sloane at Mon May 13 19:14:36 EDT 2019
STATUS

editing

approved

#22 by N. J. A. Sloane at Mon May 13 19:14:34 EDT 2019
MAPLE

seq(A308003(n), n=10..80) ;

STATUS

approved

editing

#21 by OEIS Server at Sun May 12 22:53:52 EDT 2019
LINKS

N. J. A. Sloane, <a href="/A308003/b308003_1.txt">Table of n, a(n) for n = 0..28000</a>