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-10 of 47 results. Next

A000012 The simplest sequence of positive numbers: the all 1's sequence.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 16 1994

Keywords

Comments

Number of ways of writing n as a product of primes.
Number of ways of writing n as a sum of distinct powers of 2.
Continued fraction for golden ratio A001622.
Partial sums of A000007 (characteristic function of 0). - Jeremy Gardiner, Sep 08 2002
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
Binomial transform of A000007; inverse binomial transform of A000079. - Philippe Deléham, Jul 07 2005
A063524(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2008
For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - K.V.Iyer, Apr 11 2009
The partial sums give the natural numbers (A000027). - Daniel Forgues, May 08 2009
From Enrique Pérez Herrero, Sep 04 2009: (Start)
a(n) is also tau_1(n) where tau_2(n) is A000005.
a(n) is a completely multiplicative arithmetical function.
a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)
Also smallest divisor of n. - Juri-Stepan Gerasimov, Sep 07 2009
Also decimal expansion of 1/9. - Enrique Pérez Herrero, Sep 18 2009; corrected by Klaus Brockhaus, Apr 02 2010
a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009
Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - Jaroslav Krizek, Oct 18 2009
n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - Juri-Stepan Gerasimov, Oct 26 2009
For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - Harlan J. Brothers, Nov 01 2009
a(n) is also the number of 0-regular graphs on n vertices. - Jason Kimberley, Nov 07 2009
Differences between consecutive n. - Juri-Stepan Gerasimov, Dec 05 2009
From Matthew Vandermast, Oct 31 2010: (Start)
1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).
2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)
The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.
When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - Clark Kimberling, Feb 06 2011
a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - Wolfdieter Lang, Feb 09 2012
Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - Gary W. Adamson, Mar 05 2012
As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first subdiagonal of T by -t and the other subdiagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - Tom Copeland, Nov 10 2012
The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is, 60 nautical miles, would be exactly 111111.111... meters. - Jean-François Alcover, Jun 02 2013
Deficiency of 2^n. - Omar E. Pol, Jan 30 2014
Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - Rick L. Shepherd, May 29 2014
For n>0, digital roots of centered 9-gonal numbers (A060544). - Colin Barker, Jan 30 2015
Product of nonzero digits in base-2 representation of n. - Franklin T. Adams-Watters, May 16 2016
Alternating row sums of triangle A104684. - Wolfdieter Lang, Sep 11 2016
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - A.H.M. Smeets, Oct 10 2017
a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - Jianing Song, Jul 17 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - Bernard Schott, Dec 05 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - Bernard Schott, Dec 08 2020

Examples

			1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
From _Wolfdieter Lang_, Feb 09 2012: (Start)
Modd 7 for nonnegative odd numbers not divisible by 3:
A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...
Modd 3:  1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
(End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.
  • Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 277, 284.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
  • Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).

Crossrefs

Programs

  • Haskell
    a000012 = const 1
    a000012_list = repeat 1 -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [1 : n in [0..100]];
    
  • Maple
    seq(1, i=0..150);
  • Mathematica
    Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
  • Maxima
    makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
    
  • PARI
    {a(n) = 1};
    
  • Python
    print([1 for n in range(90)]) # Michael S. Branicky, Apr 04 2022

Formula

a(n) = 1.
G.f.: 1/(1-x).
E.g.f.: exp(x).
G.f.: Product_{k>=0} (1 + x^(2^k)). - Zak Seidov, Apr 06 2007
Completely multiplicative with a(p^e) = 1.
Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - Franklin T. Adams-Watters, Feb 06 2006
Dirichlet g.f.: zeta(s). - Ilya Gutkovskiy, Aug 31 2016
a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - Wolfdieter Lang, Sep 01 2016
As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016

A051802 Nonzero multiplicative digital root of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 4, 6, 8, 1, 2, 4, 6, 8, 3, 3, 6, 9, 2, 5, 8, 2, 8, 4, 4, 4, 8, 2, 6, 2, 8, 6, 6, 8, 5, 5, 1, 5, 2, 1, 3, 5, 4, 2, 6, 6, 2, 8, 8, 3, 8, 8, 6, 2, 7, 7, 4, 2, 6, 5, 8, 8, 3, 8, 8, 8, 6, 8, 6, 4, 6
Offset: 0

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Comments

Occasionally defined with a(0) = 0.

References

  • Discussed Jun 15 1991 on sci.math by Mayne, Rusin, Landrum et al.

Crossrefs

Uses A051801.
Cf. A007954.

Programs

  • Haskell
    a051802 = until (< 10) a051801  -- Reinhard Zumkeller, Nov 23 2011
    
  • Maple
    A051801 := proc(n) local d,j: d:=convert(n,base,10): return mul(`if`(d[j]=0,1,d[j]), j=1..nops(d)): end: A051802 := proc(n) local m: if(n=0)then return 1:fi: m:=n: while(length(m)>1)do m:=A051801(m): od: return m: end: seq(A051802(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    mdr0[n_] := NestWhile[Times @@ (IntegerDigits@# /. 0 -> 1) &, n, UnsameQ, All]; Table[ mdr0@n, {n, 0, 104}] (* Robert G. Wilson v, Aug 04 2006 *)
  • PARI
    A051801(n)=my(v=select(k->k>1,digits(n)));prod(i=1,#v,v[i])
    a(n)=while(n>9,n=A051801(n)); n \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from operator import mul
    from functools import reduce
    def A051802(n):
        if n == 0:
            return 1
        while n > 9:
            n = reduce(mul, (int(d) for d in str(n) if d != '0'))
        return n
    # Chai Wah Wu, Aug 23 2014
    
  • Scala
    def zeroLessIterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => zeroLessIterDigitProd(n.toString.replace("0", "").toCharArray.map( - 48).scanRight(1)( * ).head)
    } // Note that zeroLessIterDigitProd(0) gives 0, not 1
    List(1) ++: (1 to 99).map(zeroLessIterDigitProd) // Alonso del Arte, Apr 19 2020

Formula

If n == A051801(n) then n else a(A051801(n)).

Extensions

More terms from Robert G. Wilson v, Aug 04 2006

A063108 a(1) = 1; thereafter a(n+1) = a(n) + product of nonzero digits of a(n).

Original entry on oeis.org

1, 2, 4, 8, 16, 22, 26, 38, 62, 74, 102, 104, 108, 116, 122, 126, 138, 162, 174, 202, 206, 218, 234, 258, 338, 410, 414, 430, 442, 474, 586, 826, 922, 958, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 2854, 3174, 3258, 3498, 4362
Offset: 1

Views

Author

Paul A. Loomis, Aug 08 2001

Keywords

Comments

Conjecture: no matter what the starting term is, the sequence eventually joins this one. This should be true in any base - base 2, for example, is trivial.
A063114 iterated, beginning with 1. - Reinhard Zumkeller, Jan 15 2012

Examples

			a(2) = 1 + 1 = 2; a(3) = 4; a(6) = 16 + 1*6 = 22; a(22) = 206 + 2*6 = 218.
		

Crossrefs

Programs

  • Haskell
    a063108_list = iterate a063114 1  -- Reinhard Zumkeller, Jan 15 2012
  • Maple
    with transforms;
    f:=proc(n) option remember; if n=1 then 1
    else f(n-1)+digprod(f(n-1)); fi; end;
    [seq(f(n),n=1..20)];
    # N. J. A. Sloane, Oct 12 2013
  • Mathematica
    f[ n_Integer ] := Block[{s = Sort[ IntegerDigits[ n ]]}, While[ s[[ 1 ]] == 0, s = Drop[ s, 1 ]]; n + Times @@ s]; NestList[ f, 1, 65 ]
    nxt[n_]:=n+Times@@Select[IntegerDigits[n],#>0&]; NestList[nxt,1,50] (* Harvey P. Dale, Oct 10 2012 *)
  • PARI
    lista(n)={ my(a=vector(n)); a[1]=1; for(i=1, #a-1, a[i+1] = a[i] + vecprod(select(x->x, digits(a[i])))); a } \\ Harry J. Smith, Aug 18 2009
    

Formula

A crude heuristic analysis suggests that a(n) grows roughly like (8/9 * (1-y))^(1/(1-y)) * n^(1/1-y) where y = log_10(4.5), i.e., that a(n) ~ 0.033591*n^2.8836.

Extensions

More terms from Robert G. Wilson v, Aug 09 2001

A063114 a(n) = n + product of the nonzero digits of n.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 22, 23, 26, 29, 32, 35, 38, 41, 44, 47, 33, 34, 38, 42, 46, 50, 54, 58, 62, 66, 44, 45, 50, 55, 60, 65, 70, 75, 80, 85, 55, 56, 62, 68, 74, 80, 86, 92, 98, 104, 66, 67, 74, 81, 88, 95, 102, 109, 116
Offset: 1

Views

Author

N. J. A. Sloane, Aug 08 2001

Keywords

Examples

			a(59) = 59 + 5*9 = 104. a(66) = 66 + 6*6 = 102.
		

Crossrefs

Programs

  • ARIBAS
    var stk: stack; end; for n := 1 to 80 do s := itoa(n); for j := 0 to length(s) -1 do k := atoi(s[j..j]); if k > 0 then stack_push(stk,k); end; end; write(n + product(stack2array(stk))," "); end;
    
  • Haskell
    a063114 n = n + a051801 n -- Reinhard Zumkeller, Jan 15 2012
  • Mathematica
    Table[i+Times@@(IntegerDigits[i]/. 0->1), {i, 70}]
  • PARI
    a(n) = n + vecprod(select(x->(x!=0), digits(n))) \\ Harry J. Smith, Aug 19 2009
    

Formula

a(n) = n + A051801(n). - Reinhard Zumkeller, Jan 15 2012

Extensions

More terms from Robert G. Wilson v and Klaus Brockhaus, Aug 09 2001

A352172 a(n) is the product of the cubes of the nonzero digits of n.

Original entry on oeis.org

1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 1, 8, 27, 64, 125, 216, 343, 512, 729, 8, 8, 64, 216, 512, 1000, 1728, 2744, 4096, 5832, 27, 27, 216, 729, 1728, 3375, 5832, 9261, 13824, 19683, 64, 64, 512, 1728, 4096, 8000, 13824, 21952, 32768, 46656, 125, 125, 1000, 3375, 8000, 15625
Offset: 1

Views

Author

Michel Marcus, Mar 07 2022

Keywords

Crossrefs

Used in A351876.
Cf. A051801.

Programs

  • Mathematica
    a[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; Array[a, 55] (* Amiram Eldar, Mar 07 2022 *)
  • PARI
    a(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n))));
    
  • Python
    from math import prod
    def a(n): return prod(int(d)**3 for d in str(n) if d != '0')
    print([a(n) for n in range(1, 56)]) # Michael S. Branicky, Mar 07 2022
    
  • Python
    from math import prod
    def A352172(n): return prod(map(lambda x:(0, 1, 8, 27, 64, 125, 216, 343, 512, 729)[int(x)],filter(lambda x:x>'1',str(n)))) # Chai Wah Wu, Sep 17 2024

A351876 Numbers whose trajectory under iteration of the product of cubes of nonzero digits map includes 1 (conjectured).

Original entry on oeis.org

1, 2, 3, 5, 8, 10, 11, 12, 13, 15, 18, 20, 21, 24, 25, 27, 30, 31, 42, 45, 50, 51, 52, 54, 55, 56, 57, 65, 72, 75, 80, 81, 100, 101, 102, 103, 105, 108, 110, 111, 112, 113, 115, 118, 120, 121, 124, 125, 127, 130, 131, 142, 145, 150, 151, 152, 154, 155, 156, 157, 165, 172, 175, 180, 181
Offset: 1

Views

Author

Luca Onnis, Feb 23 2022

Keywords

Comments

To determine whether a given number k is a term of this sequence, start with k, take the cube of the product of its nonzero digits, apply the same process to the result, and continue until 30 iterations are reached. If 1 is reached during the process, k is a term of this sequence. If not, k is not a term of this sequence.
Every power 10^k is a term of this sequence.
If k is a term, the numbers obtained by inserting zeros anywhere in k are terms.
If k is a term, the numbers obtained by inserting ones anywhere in k are terms.
If k is a term, each distinct permutation of the digits of k gives another term.
If k is a term, the number of iterations required to converge to 1 is less than or equal to 10 (conjectured).

Examples

			217 is a term of the sequence; its trajectory is 217 -> 2744 -> 11239424 -> 5159780352 -> 54010152000000000 -> 8000000 -> 512 -> 1000 -> 1.
4 is not a term of the sequence; its trajectory begins with 4 -> 64 -> 13824 -> 7077888 -> 5416169448144896 -> 188436971148778297205194752000 -> 1545896640285238037724131582088286996267008000000 -> ... Subsequent terms in the trajectory get larger and larger, rather than reaching 1. However, it is not yet known whether it eventually reaches 1 after some number of iterations > 30.
		

Crossrefs

Cf. A352172 (product of cubes of nonzero digits).

Programs

  • Mathematica
    Select[Range[1000], FixedPoint[ Product[ReplaceAll[0 -> 1][IntegerDigits[#]][[i]]^3, {i, 1, Length[ReplaceAll[0 -> 1][IntegerDigits[#]]]}] &, #, 12] == 1 &]

A069877 Smallest number with a prime signature whose indices are the decimal digits of n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 2, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 4, 12, 36, 72, 144, 288, 576, 1152, 2304, 4608, 8, 24, 72, 216, 432, 864, 1728, 3456, 6912, 13824, 16, 48, 144, 432, 1296, 2592, 5184, 10368, 20736, 41472, 32, 96, 288, 864, 2592, 7776, 15552, 31104, 62208, 124416, 64, 192, 576, 1728, 5184, 15552, 46656, 93312, 186624, 373248, 128
Offset: 0

Views

Author

Amarnath Murthy, Apr 25 2002

Keywords

Comments

From Antti Karttunen, Nov 17 2016: (Start)
This is a filter-sequence for decimal base: a(n) = the least number with the same prime signature as A054842(n).
This sequence can be used for filtering certain base-10 related sequences, because it matches only with any such sequence b that can be computed as b(n) = f(A054842(n)), where f(n) is any function that depends only on the prime signature of n (some of these are listed under the index entry for "sequences computed from exponents in ...").
Matching in this context means that the sequence a matches with the sequence b iff for all i, j: a(i) = a(j) => b(i) = b(j). In other words, iff the sequence b partitions the natural numbers to the same or coarser equivalence classes (as/than the sequence a) by the distinct values it obtains.
Any such sequence should match where the result is computed from the nonzero decimal digits of n, but does not depend on their order. These include for example, A007953 (digital sum and any of its variants), A010888 (digital root of n) and A051801 (product of the nonzero digits of n). As of Nov 11 2016, there were a couple of hundred such sequences that seemed to match with this one. These are given at the "List of sequences whose equivalence classes ..." link.
(End)

Examples

			a(12) = 2^2 * 3^1 = 12. a(231) = 2^3 * 3^2 * 5^1 = 360.
		

Crossrefs

Cf. A278222, A278226, A278236 for similar filter sequences constructed for other bases.
Sequences that partition N into same or coarser equivalence classes: too numerous to list all here, but at least A007953, A010888, A051801 are included. See the separate list given in links.

Formula

a(n) = A046523(A054842(n)). - Antti Karttunen, Nov 16 2016

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jul 05 2002
a(0)=1 prepended and more terms added by Antti Karttunen, Nov 16 2016

A086353 Fixed point if nonzero-digit product of n! is iterated.

Original entry on oeis.org

1, 2, 6, 8, 2, 4, 2, 8, 8, 8, 6, 1, 2, 8, 8, 8, 8, 6, 8, 8, 8, 8, 8, 2, 2, 8, 4, 8, 6, 2, 2, 6, 1, 8, 8, 8, 2, 2, 6, 8, 8, 8, 8, 8, 8, 6, 8, 6, 8, 8, 8, 6, 6, 1, 8, 8, 5, 8, 6, 6, 8, 6, 8, 2, 8, 8, 8, 6, 8, 2, 8, 8, 2, 6, 6, 8, 9, 6, 8, 8, 6, 2, 2, 8, 8, 8, 8, 4, 6, 8, 9, 6, 2, 2, 8, 2, 8, 8, 4, 4, 8, 8, 6, 2, 8
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=10, 10!=362880, iteration list={3628800,2304,24,8},a(10)=8.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, w! ], {w, 1, 128}]

Formula

a(n)=A051802[n! ]=fixed-point of A051801[n! ]

A063543 a(n) = n - product of the nonzero digits of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 18, 19, 18, 17, 16, 15, 14, 13, 12, 11, 27, 28, 26, 24, 22, 20, 18, 16, 14, 12, 36, 37, 34, 31, 28, 25, 22, 19, 16, 13, 45, 46, 42, 38, 34, 30, 26, 22, 18, 14, 54, 55, 50, 45, 40, 35, 30, 25, 20, 15, 63, 64, 58
Offset: 1

Views

Author

N. J. A. Sloane, Aug 14 2001

Keywords

Comments

The graph somewhat resembles wisteria flowers.

Examples

			a(20) = 20 - 2 = 18.
		

Crossrefs

Programs

  • Magma
    [n - &*[a: k in [1..#Intseq(n)] | a ne 0 where a is Intseq(n)[k]]: n in [1..100]]; // Marius A. Burtea, Sep 16 2019
  • Maple
    a:= n-> n-mul(i, i=subs(0=1, convert(n, base, 10))):
    seq(a(n), n=1..80);  # Alois P. Heinz, Aug 18 2019
  • Mathematica
    Table[n - Times@@DeleteCases[IntegerDigits[n], 0], {n, 70}] (* Alonso del Arte, Dec 15 2013 *)
  • PARI
    a(n) = my(d=select(x->(x!=0), digits(n))); n - vecprod(d); \\ Michel Marcus, Jan 13 2020
    
  • Python
    def a(n):
        digits = map(int, str(n))
        product = 1
        for d in digits:
            if d != 0:
                product *= d
        return n - product
    [a(n) for n in range(20)]
    # Elisabeth Zemack, Sep 16 2019; corrected by Fabio Somenzi, Jan 13 2020
    

Formula

a(n) = n - A051801(n).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Aug 14 2001

A218072 Product of the nonzero digits (in base 10) of n^2.

Original entry on oeis.org

1, 4, 9, 6, 10, 18, 36, 24, 8, 1, 2, 16, 54, 54, 20, 60, 144, 24, 18, 4, 16, 128, 90, 210, 60, 252, 126, 224, 32, 9, 54, 8, 72, 30, 20, 108, 162, 64, 10, 6, 48, 168, 288, 162, 20, 12, 36, 24, 8, 10, 12, 56, 144, 108, 30, 54, 216, 216, 96, 18, 42, 384, 1458
Offset: 1

Views

Author

Nels Olson, Oct 19 2012

Keywords

Examples

			a(32) = 8 because 32*32 = 1024 and 1*2*4 = 8.
		

Crossrefs

Similar to A053667, which does not exclude zero digits from the product.
Related to A218013.

Programs

  • Mathematica
    Table[Times@@(IntegerDigits[n^2]/.(0->1)),{n,120}] (* Harvey P. Dale, Dec 12 2017 *)
  • PARI
    a(n) = {digs = digits(n^2); prod(i=1, #digs, if (digs[i], digs[i], 1));} \\ Michel Marcus, Aug 12 2013
    
  • PARI
    a(n) = vecprod(select(x->(x>1), digits(n^2))); \\ Michel Marcus, Mar 07 2022

Formula

a(n) = A051801(n^2). - Michel Marcus, Mar 07 2022
Showing 1-10 of 47 results. Next