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

A239324 Partial sums of A090431.

Original entry on oeis.org

0, -1, -2, -4, -7, -4, -2, -3, -5, -1, -11, -13, -20, -21, -23, -28, -29, -35, -33, -36, -42, -49, -61, -67, -78, -87, -81, -76, -74, -73, -75, -81, -81, -86, -92, -98, -96, -99, -98, -100, -107, -119, -123, -127, -132, -140, -149, -142, -137, -135, -143
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 16 2014

Keywords

Comments

a(n+1) = a(n) + A090431(n).

Crossrefs

base

Programs

  • Haskell
    a239324 n = a239324_list !! (n-1)
    a239324_list = scanl (+) 0 a090431_list

A033548 Honaker primes: primes P(k) such that sum of digits of P(k) equals sum of digits of k.

Original entry on oeis.org

131, 263, 457, 1039, 1049, 1091, 1301, 1361, 1433, 1571, 1913, 1933, 2141, 2221, 2273, 2441, 2591, 2663, 2707, 2719, 2729, 2803, 3067, 3137, 3229, 3433, 3559, 3631, 4091, 4153, 4357, 4397, 4703, 4723, 4903, 5009, 5507, 5701, 5711, 5741, 5801, 5843
Offset: 1

Views

Author

Calculated by Jud McCranie

Keywords

Comments

A090431(A049084(a(n))) = 0.

Examples

			131 is the 32nd prime and sum of digits of both is 5.
		

References

Crossrefs

Programs

  • Haskell
    a033548 n = a033548_list !! (n-1)
    a033548_list = filter ((== 0) . a090431 . a049084) a000040_list
    -- Reinhard Zumkeller, Mar 16 2014
    
  • Maple
    read("transforms") :
    isA033548 := proc(n)
        if isprime(n) and digsum(n) = digsum(numtheory[pi](n)) then
            true ;
        else
            false;
        end if;
    end proc:
    A033548 := proc(n)
        local p, k;
        if n = 1 then
            131;
        else
            p := nextprime(procname(n-1)) ;
            while true  do
                if isA033548(p) then
                    return p;
                end if;
                p := nextprime(p) ;
            end do:
        end if;
    end proc:
    seq(A033548(n),n=1..40) ; # R. J. Mathar, Jul 07 2021
  • Mathematica
    Prime[ Select[ Range[ 2000 ], Apply[ Plus, IntegerDigits[ # ] ] == Apply[ Plus, IntegerDigits[ Prime[ # ] ] ] & ] ] (* Santi Spadaro, Oct 14 2001 *)
    Select[ Prime@ Range@ 5927, Plus @@ IntegerDigits@ # == Plus @@ IntegerDigits@ PrimePi@ # &]  (* Robert G. Wilson v, Jun 07 2009 *)
    nn=800;Transpose[Select[Thread[{Prime[Range[nn]],Range[nn]}],Total[IntegerDigits[First[#]]]== Total[ IntegerDigits[ Last[#]]]&]][[1]] (* Harvey P. Dale, Jun 13 2011 *)
  • PARI
    is(n)=isprime(n) && sumdigits(n)==sumdigits(primepi(n)) \\ Charles R Greathouse IV, Jun 18 2015
    
  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import primepi, primerange
    print([n for n in primerange(1, 5901) if (sum(digits(n)[1:])==sum(digits(primepi(n))[1:]))]) # Indranil Ghosh, Jun 27 2017, after Charles R Greathouse IV

Formula

a(n) = A000040(A033549(n)). - R. J. Mathar, Jul 07 2021

Extensions

More terms from Robert G. Wilson v, Jun 07 2009

A033549 Numbers k such that sum of digits of k-th prime equals sum of digits of k.

Original entry on oeis.org

32, 56, 88, 175, 176, 182, 212, 218, 227, 248, 293, 295, 323, 331, 338, 362, 377, 386, 394, 397, 398, 409, 439, 446, 457, 481, 499, 508, 563, 571, 595, 599, 635, 637, 655, 671, 728, 751, 752, 755, 761, 767, 779, 820, 821, 826, 827, 847, 848, 857, 869, 878
Offset: 1

Views

Author

Calculated by Jud McCranie

Keywords

Comments

A090431(a(n)) = 0, A007953(a(n)) = A007605(a(n)).

Examples

			131 is the 32nd prime and sum of digits of both is 5.
		

References

Crossrefs

Programs

  • Haskell
    a033549 n = a033549_list !! (n-1)
    a033549_list = filter ((== 0) . a090431) [1..]
    -- Reinhard Zumkeller, Mar 16 2014
    
  • Mathematica
    Select[Range[1000],Total[IntegerDigits[#]]==Total[IntegerDigits[ Prime[#]]]&] (* Harvey P. Dale, May 05 2011 *)
  • PARI
    is(n,p=prime(n))=sumdigits(n)==sumdigits(p) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import prime
    print([n for n in range(1, 1001) if sum(digits(n)[1:])==sum(digits(prime(n))[1:])]) # Indranil Ghosh, Jun 27 2017

A090455 Difference between numbers of binary 1's of n and binary 1's of n-th prime.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 01 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[n,2,1]-DigitCount[Prime[n],2,1],{n,80}] (* Harvey P. Dale, Aug 08 2013 *)

Formula

a(n) = A000120(n) - A014499(n);
a(A071600(n)) = a(A049084(A072439(n))) = 0.
a(A049084(A090456(n))) < 0.
a(A049084(A090457(n))) > 0.

Extensions

Definition clarified by Harvey P. Dale, Aug 08 2013

A090433 Primes p(k) having a smaller sum of digits than k.

Original entry on oeis.org

11, 13, 23, 61, 101, 103, 107, 109, 151, 163, 211, 223, 227, 241, 251, 271, 311, 313, 317, 331, 337, 347, 401, 421, 431, 433, 443, 461, 503, 509, 521, 523, 701, 911, 1009, 1013, 1021, 1031, 1033, 1051, 1061, 1063, 1103, 1109, 1117, 1123, 1129, 1151
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 01 2003

Keywords

Comments

A090431(a(n)) > 0.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[200]],Total[IntegerDigits[#]]Harvey P. Dale, Mar 05 2017 *)

A090432 Primes prime(k) having a greater sum of digits than does k.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 29, 31, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 89, 97, 113, 127, 137, 139, 149, 157, 167, 173, 179, 181, 191, 193, 197, 199, 229, 233, 239, 257, 269, 277, 281, 283, 293, 307, 349, 353, 359, 367, 373, 379, 383, 389, 397, 409, 419, 439
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 01 2003

Keywords

Comments

A090431(a(n)) < 0.

Crossrefs

Programs

  • Mathematica
    Prime[#]&/@Select[Range[100],Total[IntegerDigits[Prime[#]]]-Total[IntegerDigits[#]]>0&] (* Michel Lagneau, Nov 07 2015 *)
  • PARI
    isok(n) = sumdigits(prime(n)) > sumdigits(n); \\ Michel Marcus, Nov 07 2015

A154275 Primes p=prime(k) such that abs(sum of digits of p - sum of digits of k) is prime.

Original entry on oeis.org

5, 7, 11, 13, 19, 31, 37, 43, 47, 61, 67, 73, 89, 103, 107, 113, 137, 151, 157, 167, 173, 193, 211, 223, 227, 233, 239, 269, 271, 277, 281, 311, 353, 373, 379, 401, 409, 419, 421, 431, 433, 439, 443, 449, 467, 487, 503, 509, 571, 599, 601, 631, 641, 647, 653
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 06 2009

Keywords

Examples

			Prime(36)=151 and abs(1+5+1-(3+6)) = abs(7-9) = 2 (a prime), so 151 is in the sequence.
Prime(37)=157 and abs(1+5+7-(3+7)) = abs(13-10) = 3 (a prime), so 157 is in the sequence.
		

Crossrefs

Cf. A000040.

Programs

  • Maple
    A007953 := proc(n) add(i,i=convert(n,base,10)) ; end: A007605 := proc(n) A007953(ithprime(n)) ; end: A090431 := proc(n) A007953(n)-A007605(n) ; end: for n from 1 to 200 do q := abs(A090431(n)) ; if isprime(q) then p := ithprime(n) ; printf("%a,",p) ; fi; od: # R. J. Mathar, Jan 07 2009
  • Mathematica
    Transpose[Select[Table[{n,Prime[n]},{n,200}],PrimeQ[Abs[Total[ IntegerDigits[ #[[2]]]] -Total[IntegerDigits[#[[1]]]]]]&]][[2]] (* Harvey P. Dale, Jan 27 2013 *)

Extensions

103, 113 etc. inserted by R. J. Mathar, Jan 07 2009
Name edited by Jon E. Schoenfield, Jan 06 2019

A154313 Numbers n such that abs(A007605(n) - A007953(n)) < 2.

Original entry on oeis.org

1, 2, 7, 13, 16, 29, 32, 38, 53, 54, 56, 63, 66, 68, 69, 76, 88, 94, 126, 156, 175, 176, 182, 183, 191, 192, 212, 213, 218, 227, 248, 252, 255, 258, 259, 280, 282, 286, 291, 293, 294, 295, 298, 306, 307, 321, 323, 324, 325, 326, 331, 334, 335, 338, 345, 348
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 07 2009

Keywords

Comments

Also, numbers n such that abs(A090431(n)) < 2. - Omar E. Pol, Jan 12 2009

Examples

			If n = 16 then prime(n) = 53 and abs((5+3)-(1+6)) = 8-7 = 1, so 16 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], Abs[Apply[Plus, RealDigits[Prime[#]][[1]]] - Sum[DigitCount[#][[i]]*i, {i, 9}]] < 2 &] (* G. C. Greubel, Sep 10 2016 *)
  • PARI
    list(lim)=my(v=List(),n); forprime(p=2,, if(n++>lim,break); if(abs(sumdigits(n)-sumdigits(p))<2, listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Sep 10 2016

Extensions

Corrected and edited by Omar E. Pol, Jan 12 2009
Showing 1-8 of 8 results.