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 11-14 of 14 results.

A128244 Let s be the sum of the digits of n; a(n) is the product of the digits of s.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The sequence is equal to A053837 up to the 488th term.

Examples

			a(345)=2 because 3+4+5=12 and 1*2=2.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,w; for i from 1 by 1 to n do w:=0; k:=i; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; k:=w; w:=1; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; print(w); od; end: P(500);
    # alternative
    f:= n -> convert(convert(convert(convert(n,base,10),`+`),base,10),`*`):
    map(f, [$1..100]); # Robert Israel, Dec 09 2016
  • Mathematica
    sdpd[n_]:=Module[{s=Total[IntegerDigits[n]]},Times@@IntegerDigits[s]]; Array[sdpd, 110] (* Harvey P. Dale, Dec 17 2013 *)

Formula

a(n) = A007954(A007953(n)). - Michel Marcus, Dec 09 2016

Extensions

Offset corrected by Robert Israel, Dec 09 2016

A171772 Number of steps needed to reach a prime when the map S(n)+M(n) is applied to n, or -1 if a prime is never reached. Here S(n) and M(N) mean the sum and the product of the digits of n in base 10.

Original entry on oeis.org

1, 0, 0, 3, 0, 2, 0, 2, 2, 2, 0, 1, 0, 3, 1, 1, 0, 1, 0, 1, 1, 3, 0, 4, 1, 2, 1, 3, 0, 1, 0, 1, 2, 1, 1, 2, 0, 2, -1, 4, 0, 4, 0, 5, 1, 2, 0, 6, -1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 3, 0, 2, 2, 2, 1, 7, 0, 3, -1, 1, 0, 1, 0, -1, 1, 3, 3, 1, 0, 3
Offset: 1

Views

Author

R. J. Mathar, Oct 12 2010

Keywords

Comments

a(n)=0 if n is a prime.

Examples

			a(4)=3 because 4->8->16->13 is prime.
a(39)=-1 because 39 -> 39 ->39 ... never reaches a prime.
a(49)=-1 because 49 -> 49 ->49 ... never reaches a prime.
a(69)=-1 because 69 -> 69 ->69 ... never reaches a prime.
a(74)=-1 because 74 -> 39 ->39 ... never reaches a prime.
a(28)=3 because 28 ->26 ->20 ->2.
		

Crossrefs

A variant of A074871.

Programs

  • Maple
    f:= proc(n) local L;
      L:= convert(n,base,10);
      convert(L,`+`)+convert(L,`*`);
    end proc:
    g:= proc(n) option remember; local v,w;
         if n::prime then return 0 fi;
         v:= f(n);
         if v = n then return -1 fi;
         w:= procname(v);
         if w = -1 then -1 else w+1 fi
    end proc:
    map(g, [$1..100]); # Robert Israel, Nov 03 2019

A380192 Sum mod(10) of digits of n-th prime.

Original entry on oeis.org

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

Views

Author

Enrique Navarrete, Jan 15 2025

Keywords

Comments

All remainders 0,...,9 occur in this sequence.

Crossrefs

Programs

  • Mathematica
    Mod[DigitSum[Prime[Range[100]]], 10] (* Paolo Xausa, Feb 06 2025 *)
  • PARI
    a(n) = sumdigits(prime(n)) % 10; \\ Michel Marcus, Jan 16 2025

Formula

a(n) = A010879(A007605(n)).

A226468 Numbers in which each digit equals the sum (mod 10) of the other digits.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 505, 550, 5005, 5050, 5500, 5555, 50005, 50050, 50500, 50555, 55000, 55055, 55505, 55550, 500005, 500050, 500500, 500555, 505000, 505055, 505505, 505550, 550000, 550055, 550505, 550550, 555005, 555050, 555500, 555555, 1111116
Offset: 1

Views

Author

Michel Lagneau, Jun 08 2013

Keywords

Comments

The primitive terms in this sequence are 11, 22, 33, 44, 55, 66, 77, 88, 99, 505, 5005, 5555, 50005, 50555, 500005, 500555, 555555, 1111116, 1111666, 1166666, 2222222, 2222277, ...; the other terms are built from the permutations of the digits of these numbers.
We find the following subsequences:
505, 5005, 50005, 500005, ..., 5000000005;
55, 5555, 555555, 55555555, ..., 5555555555.

Examples

			505 is in the sequence because the digits 5,0,5 satisfy
  5 = (0 + 5) mod 10;
  0 = (5 + 5) mod 10;
  5 = (5 + 0) mod 10.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], IntegerDigits[#] == Mod[Total[IntegerDigits[#]] - IntegerDigits[#], 10] &]

Extensions

Edited by Jon E. Schoenfield, Sep 09 2017
Previous Showing 11-14 of 14 results.