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.

Previous Showing 21-25 of 25 results.

A130633 Additive persistence of Fibonacci numbers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 2
Offset: 0

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Jun 19 2007, corrected Jun 22 2007

Keywords

Comments

Up to 10000 the maximum value is 4.
Up to 10^22 the maximum value is 4. Conjecture: for n > 15, a(n) > 1. I checked the conjecture up to 10^10. - Charles R Greathouse IV, Feb 12 2025

Examples

			3524578 -> 3+5+2+4+5+7+8 = 34 -> 3+4 = 7 -> persistence = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): P:=proc(n) local a,t; t:=0; a:=fibonacci(n); while a>9 do t:=t+1; a:=convert(convert(a,base,10),`+`); od; t;
    end: seq(P(i),i=0..10^2);
  • Mathematica
    Table[Length[NestWhileList[Plus@@IntegerDigits[#]&, Fibonacci[n], #>=10&]], {n, 0, 86}]-1 (* James C. McMahon, Feb 11 2025 *)
  • PARI
    ap(n)=my(s); while(n>9, n=sumdigits(n); s++); s
    a(n)=ap(fibonacci(n)) \\ Charles R Greathouse IV, Feb 12 2025

Formula

a(n) = A031286(A000045(n)). - Michel Marcus, Feb 12 2025

Extensions

Corrected entries and changed Maple code by Paolo P. Lava, Dec 19 2017

A218000 Smallest palindrome which has additive persistence n.

Original entry on oeis.org

0, 11, 55, 595, 59999999999999999999995
Offset: 0

Views

Author

Arkadiusz Wesolowski, Oct 17 2012

Keywords

Comments

The next term is too large to include.

Examples

			0 has additive persistence 0.
11 -> 2 has additive persistence 1.
55 -> 10 -> 1 has additive persistence 2.
		

Crossrefs

Programs

  • Mathematica
    lst = {0, 11, 55}; Do[AppendTo[lst, 6*10^(((lst[[-1]] + 5)/3 - 2)/9) - 5], {2}]; lst

A239477 Smallest number with additive and multiplicative persistence equal to n.

Original entry on oeis.org

0, 10, 28, 289, 2488888888888888999999999
Offset: 0

Views

Author

Giovanni Resta, Mar 20 2014

Keywords

Comments

The corresponding smallest primes are 2, 11, 29, 487 and 2488888888888898999989999.

Examples

			a(3) = 289 because 289 is the smallest number with additive persistence 3, 289 -> 19 -> 10 -> 1 and multiplicative persistence 3, 289 -> 144 -> 16  -> 6.
		

Crossrefs

A239486 Smallest palindrome which has additive and multiplicative persistence n.

Original entry on oeis.org

0, 11, 99, 595, 467778888888979888888877764
Offset: 0

Views

Author

Giovanni Resta, Mar 20 2014

Keywords

Comments

The corresponding sequence made of palindromic primes begins with 2, 11, 12421, 757 and 746788887898878898788887647.

Examples

			a(595) since 595 is the smallest palindrome with additive persistence 3 (595 -> 19 -> 10 -> 1) and multiplicative persistence 3 (595 -> 225 -> 20 -> 0).
		

Crossrefs

A385158 Numbers k such that the sum of the digits of k is a number that appears as a substring of k, and every nonzero digit of k appears in that sum.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 199, 200, 300, 400, 500, 600, 700, 800, 900, 919, 1000, 1188, 1818, 1881, 1909, 1990, 2000, 2999, 3000, 4000, 5000, 6000, 7000, 8000, 8118, 8181, 9000, 9019, 9190, 9299, 9929, 10000
Offset: 1

Views

Author

Rivka Maryles, Jun 19 2025

Keywords

Examples

			1818 is in the sequence because 1 + 8 + 1 + 8 = 18, and 18 appears within the number. Also, all nonzero digits (1 and 8) are found in the digit sum (18).
		

Crossrefs

Cf. A052018, A007953, A031286 (numbers containing a given substring), A070939 (numbers equal to the sum of their digits concatenated), A061209 (numbers containing their digit sum).

Programs

  • Maple
    filter:= proc(k) local L,s,S,nL,nS,i;
      L:= convert(k,base,10);
      nL:= nops(L);
      s:= convert(L,`+`);
      S:= convert(s,base,10);
      nS:= nops(S);
      (convert(L,set) minus {0} = convert(S,set) minus {0}) and member(S, [seq(L[i..i+nS-1],i=1..nL-nS+1)])
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Jul 23 2025
  • Mathematica
    isok[n_] := Module[{digits, sum, sumStr},
      digits = IntegerDigits[n];
      sum = Total[digits];
      sumStr = ToString[sum];
      StringContainsQ[ToString[n], sumStr] &&
        AllTrue[DeleteCases[digits, 0],
          DigitCount[sum, 10, #] > 0 &]
    ];
    Select[Range[9999], isok]
  • Python
    def ok(n):
        digits = str(n)
        digit_sum_str = str(sum(map(int, digits)))
        return digit_sum_str in digits and all(d in digit_sum_str for d in set(digits) - {'0'})
    print([k for k in range(1, 10001) if ok(k)])
Previous Showing 21-25 of 25 results.