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-4 of 4 results.

A059708 Numbers k such that all digits have same parity.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 31, 33, 35, 37, 39, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 71, 73, 75, 77, 79, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 111, 113, 115, 117, 119, 131, 133, 135, 137, 139
Offset: 1

Views

Author

N. J. A. Sloane, Feb 07 2001

Keywords

Comments

A059717(a(n)) = a(n). - Reinhard Zumkeller, Jul 05 2011
A059707(a(n)) = a(n). - Reinhard Zumkeller, Jun 15 2012

Crossrefs

Union of A014261 and A014263.

Programs

A139281 If all digits are the same mod 3, stop; otherwise write down the number formed by the 1 mod 3 digits and the number formed by the 2 mod 3 digits and the number formed by the 3 mod 3 digits and multiply them; repeat.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 2, 3, 14, 5, 6, 17, 8, 9, 0, 2, 22, 6, 8, 25, 2, 14, 28, 8, 30, 3, 6, 33, 2, 5, 36, 2, 8, 39, 0, 41, 8, 2, 44, 0, 8, 47, 6, 36, 0, 5, 52, 5, 0, 55, 30, 5, 58, 0, 60, 6, 2, 63, 8, 30, 66, 8, 6, 69, 0, 71, 14, 2, 74, 5, 8, 77, 30, 63, 0, 8, 82, 8, 6, 85, 6, 30
Offset: 0

Views

Author

Jonathan Vos Post, Jun 06 2008

Keywords

Comments

Modulo 3 analog of A059707. The 1 mod 3 digits = {1,4,7}, 2 mod 3 digits = {2,5,8}, 3 mod 3 digits = {0, 3, 6, 9}. The fixed points begin: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 17, 22, 25, 28, 30, 33, 36, 39, 41, 44, 47, 52, 55, 58.

Examples

			a(57) = 5 because 5 and 7 are different mod 3, so 5*7 = 35; 3 and 5 are different mod 3, so 3*5 = 15; 1 and 5 are different mod 3, so 1*5 = 5, which is a fixed point.
		

Crossrefs

Extensions

a(52) corrected and sequence extended by Sean A. Irvine, Sep 03 2009

A059707 If all digits have the same parity, stop; otherwise write down the number formed by the even digits and the number formed by the odd digits and multiply them; repeat.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 2, 13, 4, 15, 6, 17, 8, 19, 20, 2, 22, 6, 24, 0, 26, 4, 28, 8, 0, 31, 6, 33, 2, 35, 8, 37, 24, 39, 40, 4, 42, 2, 44, 20, 46, 28, 48, 8, 0, 51, 0, 53, 20, 55, 0, 57, 40, 59, 60, 6, 62, 8, 64, 0, 66, 42, 68, 20, 0, 71, 4, 73, 28, 75, 42
Offset: 0

Views

Author

N. J. A. Sloane, Feb 07 2001

Keywords

Comments

a(A059708(n)) = A059708(n). - Reinhard Zumkeller, Jun 15 2012

Examples

			89 -> 8*9 = 72 -> 7*2 = 14 -> 1*4 = 4, stop, so a(89) = 4.
33278 -> 28*337 = 9436 -> 46*93 = 4278 -> 42*78 -> 2996 -> 26*99 = 2574 -> 24*57 = 1368 -> 68*13 = 884, stop, so a(33278) = 884.
		

Crossrefs

Programs

  • Haskell
    import Data.List (unfoldr)
    a059707 n = if u == n || v == n then n else a059707 (u * v) where
       (u,v) = foldl (\(x,y) d -> if odd d then (10*x+d,y) else (x,10*y+d))
            (0,0) $ reverse $ unfoldr
            (\z -> if z == 0 then Nothing else Just $ swap $ divMod z 10) n
    -- Reinhard Zumkeller, Jun 15 2012
  • Mathematica
    f[n_] := (id = IntegerDigits[n]; oddDigits = Select[id, OddQ]; evenDigits = Select[id, EvenQ]; Which[oddDigits == {}, FromDigits[evenDigits], evenDigits == {}, FromDigits[oddDigits], True, FromDigits[evenDigits] * FromDigits[oddDigits]]); a[n_] := FixedPoint[f, n]; Table[a[n], {n, 0, 76}] (* Jean-François Alcover, May 16 2013 *)
    sp[n_]:=Module[{idn=IntegerDigits[n],e,o},e=Select[idn,EvenQ];o= Select[ idn,OddQ];If[Min[Length[o],Length[e]]>0,FromDigits[o] FromDigits[e], n]]; Table[FixedPoint[sp,i],{i,0,80}] (* Harvey P. Dale, Jun 05 2014 *)

Extensions

a(50) corrected by Reinhard Zumkeller, Jun 15 2012

A379512 Erase digits 0 and 1 from decimal expansion of n. Then keep just the coprime digits; write 0 if all digits disappear.

Original entry on oeis.org

0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 0, 23, 0, 25, 0, 27, 0, 29, 3, 3, 32, 0, 34, 35, 0, 37, 38, 0, 4, 4, 0, 43, 0, 45, 0, 47, 0, 49, 5, 5, 52, 53, 54, 0, 56, 57, 58, 59, 6, 6, 0, 0, 0, 65, 0, 67, 0, 0, 7, 7, 72, 73, 74, 75, 76, 0, 78, 79, 8, 8, 0, 83, 0, 85, 0, 87
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 21 2025

Keywords

Comments

The numbers n such that a(n) = k for any fixed k are a 10-automatic sequence. - Charles R Greathouse IV, Jan 21 2025

Examples

			a(10) = 0 as we do not accept zeros and ones in n.
a(22) = 0 as gcd(2,2) = 2.
a(25) = 25 as gcd(2,5) = 1.
a(1234567890) = a(23456789) = a(3579) = a(57) = 57.
Note that numbers n with even digits and numbers n containing digits 0 and 1 only disappear immediately and we get a(n) = 0.
		

Crossrefs

Programs

  • PARI
    a(n)=my(d=select(k->k>1, digits(n))); if(sum(i=1,#d, d[i]%2==0)>1, d=select(k->k%2,d)); if(sum(i=1,#d, d[i]%3==0)>1, d=select(k->k%3,d)); if(sum(i=1,#d, d[i]==5)>1, d=select(k->k!=5,d)); if(sum(i=1,#d, d[i]==7)>1, d=select(k->k!=7,d)); fromdigits(d) \\ Charles R Greathouse IV, Jan 21 2025

Formula

a(n) <= 9875. There are 299 distinct values in this sequence. - Charles R Greathouse IV, Jan 21 2025
Showing 1-4 of 4 results.