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

A130891 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k*floor(n/10), where k is the smallest integer such that n < 10^k.

Original entry on oeis.org

0, 1, 2, 0, 4, 0, 6, 0, 8, 9, 10, 2, 12, 2, 14, 15, 16, 2, 18, 2, 20, 21, 22, 4, 24, 25, 26, 27, 28, 4, 30, 6, 32, 33, 34, 35, 36, 6, 38, 39, 40, 8, 42, 8, 44, 45, 46, 8, 48, 49, 50, 51, 52, 10, 54, 55, 56, 57, 58, 10, 60, 12, 62, 63, 64, 65, 66, 12, 68
Offset: 0

Views

Author

Mohammad K. Azarian, Aug 21 2007

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
      if n::odd and isprime(n) then
        k:= ilog10(n)+1;
        k*floor(n/10)
      else n
      fi
    end proc:
    map(f, [$0..100]); # Robert Israel, Aug 04 2019
  • Mathematica
    Table[If[n>2&&PrimeQ[n],IntegerLength[n]Floor[n/10],n],{n,0,70}] (* Harvey P. Dale, Mar 31 2025 *)

Extensions

Offset changed by Mohammad K. Azarian, Nov 19 2008
Offset corrected by Robert Israel, Aug 04 2019

A130892 a(n) = n if n is not an odd prime number. Otherwise, a(n) = k*ceiling(n/10), where k is the smallest integer such that n < 10^k.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 6, 1, 8, 9, 10, 4, 12, 4, 14, 15, 16, 4, 18, 4, 20, 21, 22, 6, 24, 25, 26, 27, 28, 6, 30, 8, 32, 33, 34, 35, 36, 8, 38, 39, 40, 10, 42, 10, 44, 45, 46, 10, 48, 49, 50, 51, 52, 12, 54, 55, 56, 57, 58, 12, 60, 14, 62, 63, 64, 65, 66, 14, 68
Offset: 1

Views

Author

Mohammad K. Azarian, Aug 21 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{0,1,2},Table[If[PrimeQ[n],IntegerLength[n]Ceiling[n/10],n],{n,3,99}]] (* Harvey P. Dale, Sep 14 2013 *)

Extensions

Offset corrected by Mohammad K. Azarian, Nov 19 2008
Showing 1-2 of 2 results.